2 Replies Latest reply on Dec 24, 2018 1:14 AM by user_342122993

    PSoC PID

    molinac5_3933941

      Hi all,

       

      I am currently trying to implement a PID controller. I am fairly new to PSoC so this is going to be a bit of a challenge for me. The goal of the project is to control the output RMS of a DC-to-AC converter. The way this is done is the following, the RMS value is obtained through the sampling of the output sine wave. A SIMULINK diagram of the whole operation can be seen below.

       

       

      The RMS is subtracted from whatever RMS value I set. The error then passes through a PI controller and then is multiplied with the control sine wave signal. I am generating the control sine wave and triangle waves in PSoC using the WaveDAC component. Since I am trying to use the sine wave as a control signal, from my understanding, I have to pass it through some ADC in order to multiply it by the output of the PI controller.

       

      My problem the following: I have read articles on PID using C, and from what I have read, you need to use 16 bits for floating point math. I am using the PSoC

      CY8CKIT-059 which only contains one Delta-Sigma ADC which can have up to 16 bit resolution whereas the SAR can only go up to 12. Is there a way I could get around this? Like I said, I am fairly new to PSoC as well as coding in C as is. The Top Design for my project can be seen below.

      Thanks,