04-01-2013 02:09 PM
Hi All,
I have a closed loop system with PID function which controls a heating element, this code works correctly. I now have to get theoretical values for PID using an ziegler nichols open loop. I am controlling the elements 220VAC supply via an SSR, i now need to create a square wave where i can adjust the duty cycle between 0-100%, i should then be able to relate 100% to 220VAC and so on. I need this control so i do not burn out the element while still achieving a step response to achieve a steady state output. I have an Arduino and a NI 6008 on which i can implement.Any help on this would be greatly appreciated.
Thanks,
David
04-02-2013 04:25 PM
You need a device with a hardware timer output to generate a PWM signal that will control the relay. The USB-6008 does not have such an output; you'll need a more expensive DAQ device such as the USB-6210 which supports pulse generation. I do not know if the Arduino can generate a PWM signal, you'll have to check the documentation. It is possible to generate a PWM signal in software with the 6008, but it probably will not be high enough frequency nor reliable enough to achieve the level of control you need.
04-02-2013 04:32 PM
The Arduino can generate a PWM signal, you'll just need to double check that it has enough current to drive the SSR.
04-02-2013 04:35 PM
I'm not so worried about the duty cycle. I would expect that you will fry that element pretty fast if you don't switch your SSR on the zero crossings of the line voltage you are controlling
04-03-2013 01:06 AM
Thanks fro the responses,
I managed to get it working, my adruino can handle a 40mA output and my SSR control current is 4mA. I used the generate signal function to generate a square wave, i then used a select function to output a 1 to a digital output pin on the arduino when the duty cycle is greater than 0, this provided the controllable chopped DC signal i required. When i used a Duty cycle of 30% i got a steady state response. 30% of 235VAC is 82.25VAC which i can use in my calculations for the step input.
Thanks again,
David