generator engine speed control PID loop

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
timbo017
Flowcode V4 User
Posts: 1
Joined: Sun Feb 27, 2011 7:21 pm
Contact:

generator engine speed control PID loop

Post by timbo017 »

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.

nuwan5213
Posts: 82
Joined: Thu Jul 29, 2010 10:03 am
Location: sri lanka
Contact:

Re: generator engine speed control PID loop

Post by nuwan5213 »

have you got any flowcode for this
Electronics for better world.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Contact:

Re: generator engine speed control PID loop

Post by dazz »

Hi Timbo

Have a quick search of the forum as there are a few threads similar to what you want to achieve, If you have made a start on a flowchart post it up and others will be more able to guide you to what you want to acheive

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Contact:

Re: generator engine speed control PID loop

Post by Enamul »

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.
I can think what you are planning to make..so I would suggest you to try with frequency counter program to measure pulses first and then to concentrate in adjusting the pulse frequency by feedback..
To start with you need to have programmer and some E-blocks or similar hardware..you can try Flowcode example file frequency counter. let me know if you can't find that.
Enamul
University of Nottingham
enamul4mm@gmail.com

Post Reply