Alternator Control box for standalone MS install for NB
#61
Mmm, I get raising amps with raising voltage:
10.7mA at 11.5V
11.1mA at 12.0V
12.1mA at 13.0V
13.1mA at 14.0V
14.0mA at 14.9V
mmm, seems something is not right here. I should be getting lower charge current at higher voltages, no?
Any clue what might be wrong?
I wish I had your skills Jim ... and Jason for that matter
10.7mA at 11.5V
11.1mA at 12.0V
12.1mA at 13.0V
13.1mA at 14.0V
14.0mA at 14.9V
mmm, seems something is not right here. I should be getting lower charge current at higher voltages, no?
Any clue what might be wrong?
I wish I had your skills Jim ... and Jason for that matter
Last edited by WestfieldMX5; 05-28-2009 at 02:52 PM.
#62
Elite Member
iTrader: (10)
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,977
Total Cats: 356
Pics.
Configurable options:
Cranking RPM (below cranking you are in non-running mode)
Min non-running voltage (flashing battery light when below, steady light when above)
Min running voltage (flashing battery light when below, light switched off when above)
Basic target voltage (trimmed based on air temp)
Max error voltage (deadband)
P Gain
I Gain
D Gain
Settings are saved in internal EEPROM so no battery is required to retain the settings.
Jim
Configurable options:
Cranking RPM (below cranking you are in non-running mode)
Min non-running voltage (flashing battery light when below, steady light when above)
Min running voltage (flashing battery light when below, light switched off when above)
Basic target voltage (trimmed based on air temp)
Max error voltage (deadband)
P Gain
I Gain
D Gain
Settings are saved in internal EEPROM so no battery is required to retain the settings.
Jim
#64
Reverant,
As a microcontroller stud, would you want to tackle closed loop boost control?
Here's what *I* need.
I have an AEM. It has:
1) a 3D boost target table with RPM and TPS as axes,
2) a 3D table for base solenoid duty cycle with RPM and MAP as axes
3) a 2D table for additional duty cycle vs. boost target
4) a 2D table for additional duty cycle vs. boost error (like a nonlinear 'P' in PID)
5) and an 'I' gain term for the I in PID
Features 1 to 4 rock for enabling one to tune throttle and RPM based boost and to instantly get CLOSE to boost target (within 1 psi).
However it has a fatal flaw in its closed loop control, which makes it overshoot or oscillate. IT HAS NO 'D'. In addition, its 'I' parameter should ONLY kick in once boost is closed (like say within 2 PSI), AND it should RESET to zero just before it kicks in.
So... Given the AEM's capability, I'd like to use its tables 1 - 4. I'd like the microcontroller to have an internal boost target vs. RPM and TPS table internally which is fixed, and mirrors that in the AEM - and I'd like the micro to implement the I and the D. This I and D should each have 2 gain parameters - a gain term when above, and a gain term when below, target boost. And it should have an adjustable "window" (e.g. 2 psi) - I and D are zeroed out (i.e. system runs open loop) when target boost minus actual boost is greater than this window.
Is it possible to first implement the algorithm in a high level language such as MATLAB/SIMULINK or C, and run on a PC->USB gizmo, before writing the code into a micro? This way the algorithm can be developed on a platform wherein datalogging and tracing is easy.
Sound like fun?
As a microcontroller stud, would you want to tackle closed loop boost control?
Here's what *I* need.
I have an AEM. It has:
1) a 3D boost target table with RPM and TPS as axes,
2) a 3D table for base solenoid duty cycle with RPM and MAP as axes
3) a 2D table for additional duty cycle vs. boost target
4) a 2D table for additional duty cycle vs. boost error (like a nonlinear 'P' in PID)
5) and an 'I' gain term for the I in PID
Features 1 to 4 rock for enabling one to tune throttle and RPM based boost and to instantly get CLOSE to boost target (within 1 psi).
However it has a fatal flaw in its closed loop control, which makes it overshoot or oscillate. IT HAS NO 'D'. In addition, its 'I' parameter should ONLY kick in once boost is closed (like say within 2 PSI), AND it should RESET to zero just before it kicks in.
So... Given the AEM's capability, I'd like to use its tables 1 - 4. I'd like the microcontroller to have an internal boost target vs. RPM and TPS table internally which is fixed, and mirrors that in the AEM - and I'd like the micro to implement the I and the D. This I and D should each have 2 gain parameters - a gain term when above, and a gain term when below, target boost. And it should have an adjustable "window" (e.g. 2 psi) - I and D are zeroed out (i.e. system runs open loop) when target boost minus actual boost is greater than this window.
Is it possible to first implement the algorithm in a high level language such as MATLAB/SIMULINK or C, and run on a PC->USB gizmo, before writing the code into a micro? This way the algorithm can be developed on a platform wherein datalogging and tracing is easy.
Sound like fun?
#65
Elite Member
iTrader: (10)
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,977
Total Cats: 356
Jason, I wouldn't mind tackling such a project, though I would first prefer to go closed loop on my VVT controller (vs open loop right now). The fact that I run N/A will not make things easy.
FYI I always code in Codevision C, with very little assembly in interrupt handlers.
Jim
FYI I always code in Codevision C, with very little assembly in interrupt handlers.
Jim
#67
2 Props,3 Dildos,& 1 Cat
iTrader: (8)
Join Date: Jun 2005
Location: Fake Virginia
Posts: 19,338
Total Cats: 573
Jason, I wouldn't mind tackling such a project, though I would first prefer to go closed loop on my VVT controller (vs open loop right now). The fact that I run N/A will not make things easy.
FYI I always code in Codevision C, with very little assembly in interrupt handlers.
Jim
FYI I always code in Codevision C, with very little assembly in interrupt handlers.
Jim
#69
Jason, I wouldn't mind tackling such a project, though I would first prefer to go closed loop on my VVT controller (vs open loop right now). The fact that I run N/A will not make things easy.
FYI I always code in Codevision C, with very little assembly in interrupt handlers.
Jim
FYI I always code in Codevision C, with very little assembly in interrupt handlers.
Jim
Point one - it inherently has an integrator built in. It CANNOT run in open loop, it will always integrate towards full advance or full retard.
Point two - the output of your feedback loop should be a solenoid CURRENT command, not a duty cycle.
BTW re: alternator control. A very simple effective control is a hysteretic controller, which is what my circuit does. No need for PID. And the output must be PWM. Turn alternator on if voltage is below 14.3. Turn it off if >14.35. After turning on or off, stay in that state a minimum of 50 uS, then make new decision. Polling for new decision should be at 10 uS sampling.
And, if RPM is dropping and is below 800 Hz, progressively drop voltage setpoint in order to help prevent the engine from stalling. (my circuit doesn't do this).
#70
In the car, I measured 15.1V with running engine.
My el cheapo DVM must be off a bit.
I guess it's best if I lower my setpoint to the same voltage I have in the car (15.1V).
Is this just a matter of changing the values of R4 and R11 so that Vref is a bit lower in this formula?
15.1V=Vref*(1 + R4/R11)
#72
Elite Member
iTrader: (10)
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,977
Total Cats: 356
Reverant, did you see my post in the ECU section of my observations of the VVT? The physical model and its characteristics is crucial in architecting the feedback system.
Point one - it inherently has an integrator built in. It CANNOT run in open loop, it will always integrate towards full advance or full retard.
Point one - it inherently has an integrator built in. It CANNOT run in open loop, it will always integrate towards full advance or full retard.
My current system uses feedback from the oil pressure sensor I have. Its not much, but it roughly working.
BTW re: alternator control. A very simple effective control is a hysteretic controller, which is what my circuit does. No need for PID. And the output must be PWM. Turn alternator on if voltage is below 14.3. Turn it off if >14.35. After turning on or off, stay in that state a minimum of 50 uS, then make new decision. Polling for new decision should be at 10 uS sampling.
Jim
#74
Sure enough, setpoint is at 15.27V (2.53Vref).
In the car, I measured 15.1V with running engine.
My el cheapo DVM must be off a bit.
I guess it's best if I lower my setpoint to the same voltage I have in the car (15.1V).
Is this just a matter of changing the values of R4 and R11 so that Vref is a bit lower in this formula?
15.1V=Vref*(1 + R4/R11)
In the car, I measured 15.1V with running engine.
My el cheapo DVM must be off a bit.
I guess it's best if I lower my setpoint to the same voltage I have in the car (15.1V).
Is this just a matter of changing the values of R4 and R11 so that Vref is a bit lower in this formula?
15.1V=Vref*(1 + R4/R11)
Are you using 1% resistors?
I think step 1 is to get a more accurate voltmeter.
#75
The oil control solenoid responds to current, not PWM duty cycle. The current will change for a given duty cycle as system voltage changes. So the output of the PID plant should command a current, and a 2nd, faster, inner feedback loop should control the solenoid current by sensing it and outputting a PWM signal. This will prevent the cam angle from changing when there's an abrupt change in system voltage (lights or fans turning on, for example).
Find my post and read it, then ask questions there.
Cheers!
#76
Will replace it with a 1% (and get a better DVM as well ).
Glad the circuit works though. Another step closer to MS2E completion. About getting time as well after 6 months .
thx for your help.
Last edited by WestfieldMX5; 05-29-2009 at 07:16 PM.
#78
Boost Pope
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,027
Total Cats: 6,593
Is the mechanical load of the alternator going up for some reason as you reduce the field supply and drop the voltage? I can't imagine why it would, but then I can't find any other explanation for this behavior either.
Consider the situation of the alternator failing during engine operation, due to a broken belt for instance. The engine keeps running, being supplied only by battery voltage.
#79
Jason, PM's full.
Thanks for catching that, I took a "R9, 1k" and made it "9k". Will Fix.
Yeah - I'm with Joe, low voltage sounds like a symptom, not a cause. The motor should run fine without the alternator on all the time. I've thought about opening an air leak or cutting the alternator on low RPM, but haven't implemented it yet.
Jason: I like the current on the VVT idea, where do you talk about this?
Thanks for catching that, I took a "R9, 1k" and made it "9k". Will Fix.
Yeah - I'm with Joe, low voltage sounds like a symptom, not a cause. The motor should run fine without the alternator on all the time. I've thought about opening an air leak or cutting the alternator on low RPM, but haven't implemented it yet.
Jason: I like the current on the VVT idea, where do you talk about this?