+1 vote
53 views
ago in Hardware by S M Sajjad Hossain Rafin (19 points)

I am facing an issue with the HIL 101 ADC output while measuring three-phase voltages and currents (40.82 V phase RMS, 60 Hz) via Simulink. Despite configuring scaling, offset, and filtering as per the documentation, the ADC signals appear noisy and step-like rather than clean sine waves. I would appreciate your advice on the correct ADC sampling strategy, the potential need for external RC filtering, and any recommended settings or references for this setup.

2 Answers

+1 vote
ago by Jovan Zelic (302 points)
selected ago by S M Sajjad Hossain Rafin
 
Best answer

To be honest, to me it seems more likely that there's something wrong with regards to how ADC triggering is configured. It looks like at some points your ADC didn't trigger, so an old sample wasn't updated. Specifically, I'm referring to the "horizontal sections" in your waveform. 

One simple thing you can do is test the HIL AO using oscilloscope, or you can just use jumper wires to send HIL AO to HIL AI, and then use HIL to verify the analog output.

You can also try generating the code for target platform using TI C2000 Toolbox in Typhoon, which you can find here.

ago by S M Sajjad Hossain Rafin (19 points)
Thank you for your response.

I have used an oscilloscope, and all the HIL AO are perfectly fine. Surely, I am doing something wrong with the ADC configuration in Simulink.

Using the TI C2000 Toolbox sounds great. Unfortunately, the installation file is for MACOS (.pkg), and I am using a Windows PC. I tried to find an .exe file, but no luck.

Could you please have a look at the ADC configuration that I am using in the Simulink? This configuration worked fine with ORAL-RT.
ADC Module - A, Input channel - ADCIN4, Resolution - 12-bit (single), SOC number - SOC0, Acquisition window - 20, SOC trigger source - Software, ADCINT - No ADCINT, Sample time - 1e-4, Data type - single.

Regards,
Rafin
ago by Jovan Zelic (302 points)
Hi Rafin,

.pkg files are recognized by Package Manager (https://www.typhoon-hil.com/documentation/typhoon-hil-software-manual/concepts/package_manager.html), so you can install the TI C2000 Toolbox that way.

ADC configuration makes sense to me. Maybe there's a problem with regards to how you observe the data? What's the rate at which you look at your signals in the Scope?
+1 vote
ago by Milan Arsenijevic (60 points)

To follow up on Jovan's answer, I've attached a simple model where you can generate the code and validate ADC by using TI C2000 Toolbox. There is a subsystem called 'adc' where ADC component is configured and TI C2000 Setup component where you can click 'Build and deploy' button to generate and deploy the code to your controller. The value of the signal is scaled to PWM duty cycle range and applied to the input of the PWM component. 

In order to observe ADC result, you can track the value of 'ao1_sample' probe in Code Composer Studio, or you can use the part of the model with PWM Analyzer which will output the duty cycle value of the PWM signal applied to the HIL digital input selected in the PWM component. This is an easy way to observe signals from external controller in SCADA. Keep in mind that you need appropriate HIL firmware configuration that supports PWM Analyzer according to device configuration table.

ago by S M Sajjad Hossain Rafin (19 points)
Thank you for your response.

Using the TI C2000 Toolbox sounds great. Unfortunately, the installation file is for MACOS (.pkg), and I am using a Windows PC. I tried to find an .exe file, but no luck.

Regards,
Rafin
...