MATLAB Central Discussions - Join the conversation!
Contenido principal

Resultados de


I am using simulink to generate a simple ADC sampling code. I configured ADC module in software mode, which updates the sampled value according to the sample time configured in the module. I set the sample time to 1e-4, 1e-5, 1e-6 respectively. But it seems that the sampling speed did not reach the value I set. I suspect it has something to do with the read and write operations, but I am not sure if that's the reason.
I also tried to do it using PWM event to trigger the start of conversion of ADC. Same problem happened. Because I connect a potentiometer and turn its knob slowly, the Graph on CCS is correct while when I turn it very quickly, the graph is not able to keep up with my movements. So the sampling rate is surely not enough. I wonder what I should do to successfully configure this model, thanks in advance!

Hello everyone,

      Recently i started using MATLAB Real Time Code Generation Tool to generate code for 3 phase Induction motor speed control using V/F. I used the piccolo launchpad F28027 to implement this V/F technique. I used a pot to get the frequency input and computed the corresponding Voltage using V/F ratio. When i tried implement it on the board, output PWM frequency was not exactly the same which i simulated. It was 2 - 3 times higher than the actual. So i tried reducing the inputs by the same 2-3 times. It worked. 
       Question is, what the problem with the code and processor?  why difference in PWM frequency between simulation and Realtime?
Go to top of page