generator engine speed control PID loop
Posted: Wed Sep 26, 2012 10:33 pm
Hi i am new to pic programing and flowcode and am working though the free course and am finding flowcode very good as a beginner.
I have a real world project that i am doing at present which is a 12kva genorator attached to a VW diesel engine and i need to create a servo controlled throttle system to govern the engine speed under load conditions to approximately 2000 rpm similar to a PID loop system.
My idea of how the system will basically work is i have a cam speed sensor with a square wave signal as a digital input 20Hz at 750 rpm to 90Hz at 4000rpm so my target signal speed is aprox 45Hz
So what i need to do within my flowchart is to,
Measure the engine speed,ie (count the pulses for say 100ms in a loop )to arrive at an engine speed then
then use a calculation, of the measured speed followed by a decision/s, if lower or higher than the desired speed
followed by the servo, control +/- to control the throttle to desired speed
Thanks in advance for any idea,s as i may have the wrong idea altogether.
I have a real world project that i am doing at present which is a 12kva genorator attached to a VW diesel engine and i need to create a servo controlled throttle system to govern the engine speed under load conditions to approximately 2000 rpm similar to a PID loop system.
My idea of how the system will basically work is i have a cam speed sensor with a square wave signal as a digital input 20Hz at 750 rpm to 90Hz at 4000rpm so my target signal speed is aprox 45Hz
So what i need to do within my flowchart is to,
Measure the engine speed,ie (count the pulses for say 100ms in a loop )to arrive at an engine speed then
then use a calculation, of the measured speed followed by a decision/s, if lower or higher than the desired speed
followed by the servo, control +/- to control the throttle to desired speed
Thanks in advance for any idea,s as i may have the wrong idea altogether.