Tuning the Megasquirt (Pt 5.) - PID Control!

  Рет қаралды 26,022

OGPedXing

OGPedXing

Күн бұрын

Want to make the most power? Be efficient? Then you need PID tuning. This is the fundamentals of PID (proportional integral derivative) control setup and tuning. PID is a control mechanism for closed loop systems -- it's used everywhere in industry because it's so effective. In the Megasquirt it's used for EGO/AFR control and idle RPM control.
We go through the basic principles of PID control, what each of the three gain terms mean and what they do and how they contribute to the control process. Then we talk about tips for how to set it up on your own car and what to look out for.
OGPedxing is all about DIY, gadgets, and tools.

Пікірлер: 37
@perjian1697
@perjian1697 7 ай бұрын
Still the best group of tuning videos on yt for tunerstudio. And for general explanation! Cheers!
@fatninja987
@fatninja987 5 жыл бұрын
these videos i have found really helpful in my tuning journey, I greatly appreciate it and am excited to keep learning about megasquirt and how things work and why.
@fatninja987
@fatninja987 3 жыл бұрын
@Yael Preston yeah nice try, not falling for that
@fatninja987
@fatninja987 3 жыл бұрын
@Brantley Vihaan yeah nope
@scotts2296
@scotts2296 5 жыл бұрын
Really great info. I'm learning a lot. Wish it wasn't winter here so I can run the car and play with the tune more. Keep up the good work!
@WigglingWaffles
@WigglingWaffles 5 жыл бұрын
thanks for the videos man. I can't wait for spring to start putting them to use, but I feel like allot of this information will really help. My idle is garbage (it idles, but not like it should) and I can't wait to reference your videos over and over and get The Perfect Idle TM
@harrisdoesthings
@harrisdoesthings 5 жыл бұрын
Cheers for the vid man, I did try closed loop idle on my 1.6 turbo'd mx5, but for some reason I couldn't get it to idle as well as the open loop.. Looks like I'll just have to keep tinkering. This vid gave me a bit more understanding on PID though!
@OGPedXing
@OGPedXing 5 жыл бұрын
Keep trying! I think it's worth it, closed loop and especially with PID can keep everything very smooth in basically all conditions and also keep you from getting lean accidentally in boost.
@BladeHP1
@BladeHP1 3 жыл бұрын
Thank you só much for this vídeo , it’s amazing !
@kikkegek
@kikkegek 3 жыл бұрын
thanks man, very helpfull and very clear video
@travisclarke9214
@travisclarke9214 2 жыл бұрын
Thanks for the lesson
@KoenigsTiger957
@KoenigsTiger957 3 жыл бұрын
Thank you for the video. I need to play with EGO. Mine isolates wildly, does not hit the target. Runs better with EGO disabled... need more videos :)
@OGPedXing
@OGPedXing 3 жыл бұрын
I plan to add a deeper dive into ego pretty soon actually...next up is e85 though!
@alltheboost5363
@alltheboost5363 5 жыл бұрын
First I want to say thank you for making the video. I currently use 20/5/0. And it gets really close but it never quite gets there... which I'm ok with. For the first 14yrs of using megasquirt I didn't even use a ego control. The main reason for that was because I was using a NGK powerdex wideband and it has roughly a 1 second delay and it made it really hard to use at least with my ECU. I have a v2.2 upgraded to megasquirt 2. I recently within the past year or so started using the innovative wideband boost controller (scg-1) and it works really well with ego and pid. I wasn't going to go with Innovative but I got a really good deal on it 100 bucks they didn't know how to use it and it works great. The only problem I run into is when I use more than 8% Authority gain it oscillates really bad up to that point it's fine it doesn't oscillate at all... any ideas? My gut feeling is that my ECU just doesn't have the computing power to handle it and that I really need to go to a 3.0 or a 3.57 board.
@OGPedXing
@OGPedXing 5 жыл бұрын
Thanks for the support, I appreciate it. 8% authority is actually a good number to shoot for, your fuel table should do the main work with ego just tweaking to adjust for conditions. Sometimes it's good to turn it off and drive for a while with autotune running to verify your main fuel table. With that good you can stabilize your PID numbers without it fighting you. Your numbers seem fine but if you get occilation you'll want to back off the P term a bit until it's mostly gone and then add in some I to speed up reaching target.
@alltheboost5363
@alltheboost5363 5 жыл бұрын
I've got a pretty dialed in. For some reason ego control works way better if I'm pulling fuel rather than adding fuel. The only problem that I'm having with megasquirt is noise filtration... anytime I turn it on the car won't run. The way I turn it on is I have the car off but ECU on turn noise filtration on Burn power cycle the ECU turn it back on verify that everything is the way I want it and then try to start and it won't. To get the car running again sometimes I just going to load my last tune and will get it to run and other time I've had to reload firmware along with an old tune. I've been driving this car for 10-12 years I've put almost a 100k miles on my megasquirt and they're hard miles. I'm just really tired of it misfiring at idle and just off idle. If I watch the data logs it goes to 66000 RPM when it misfires. It only does it under 2,000 RPM once in a blue moon it'll misfire above that. Any ideas?
@In3xorable
@In3xorable 4 жыл бұрын
@@alltheboost5363 Put a resistor in line with the crank sensor 10k. Put a diod in between the power and ground wires on the iac valve. No more misfire. No more pulsing in the ground planes.
@alltheboost5363
@alltheboost5363 4 жыл бұрын
I finally got noise filtering to work but only if ego is off. I do need to get my fuel map a little more dialed in and I think that may have something to do with it. I just switched from 100ll back to 93. I think the 100ll was a little much with water meth. Lol in a couple days I'm going to an open test and tune. Excited to get the top in tuned well. Thanks for the advice
@tristanpiet5493
@tristanpiet5493 5 жыл бұрын
Any where that I have missed VE fuel table adjustment? Just installed megasquirt in my daily driver! You have saved me so much headache!
@OGPedXing
@OGPedXing 5 жыл бұрын
Yeah it's important to get the fuel ve table fairly close before really dialing in the PID tune via ego control. You can keep the authority fairly low like 10%. If you see that the EGO control is trying to add fuel or subtract fuel a lot then you should go back to the fuel table and adjust it.
@heavyd2249
@heavyd2249 5 жыл бұрын
Great videos! What can I do help with AC running? I have the idle AC set up but maybe it's not aggressive enough. After I blip the throttle the rpms drop below my 850 target and stay low.
@motabikeboy
@motabikeboy 3 жыл бұрын
you need a idle air valve.
@DJimeku
@DJimeku 3 жыл бұрын
so what values did you end up putting in your final tune for PID? Did you keep PID at 0%?
@OGPedXing
@OGPedXing 3 жыл бұрын
For my ego PID, I've been running p=15, I=6, d=2
@dohc22h
@dohc22h 4 жыл бұрын
Would the tip in settings have an influence on the PID
@OGPedXing
@OGPedXing 4 жыл бұрын
Indirectly... Tip in / Accel Enrichment settings will override normal EGO temporarily. It will squirt in some extra fuel to deal with the burst of air from the throttle. However this is completed quickly and then normal EGO and PID takes over after that trying to make your AFR match what you set in the table. Getting Accel Enrichment tuned can help EGO come back more quickly. This is because getting the right amount of fuel in will keep it from stumbling and will keep PID from having to compensate too much.
@joem6859
@joem6859 3 жыл бұрын
ahh... yes, integration: the area under the curve between 2 limits... brings back college engr math. Calculus: the language of physics and engineeering. Anywho... pretty good video. Does the EGO correct the VE table?? or the VE value is just the starting point for all the math?? Just got mine running the other day, this tuning stuff is expansive, thanks again
@OGPedXing
@OGPedXing 3 жыл бұрын
The ve table is the starting point and then the ego process tries to compensate for things happening like temperature by adding or pulling fuel so you hit your afr target. Ideally EGO only needs to modify the ve table by 2-3% max at any given time. So you want to aim to get the ve table as optimized as possible. This makes further tuning a lot easier.
@joem6859
@joem6859 3 жыл бұрын
@@OGPedXing so the ve table is not changed by ego control, correct??
@OGPedXing
@OGPedXing 3 жыл бұрын
Correct. Its values stay the same during EGO. Autotuning/VE analayze on the other hand will change the ve table directly.
@robbedoes1985
@robbedoes1985 5 жыл бұрын
Hey man i have tried to reproduce this. I first tested my setup (MS2) with the simple Algorithm to see if everything worked. It did, ego correction followed target but veeery slowly. After that i switched to PID and and started with P 2. Opened the AFR target table and switched the cell from 12 to 16 up and down with 20 seconds in between. I could clearly see the the step change in the target graph in the Logger view in TS and MLV. But EGO correct kept flat 100%. So is started going to P10, 20, 40, 80, 160, 200. But i never got oscilation or overshoot in the 20 second AFR 12-16 switching. What am i doing Wrong?
@OGPedXing
@OGPedXing 5 жыл бұрын
If the ego correction gauge stays at 100 it's not adding or subtracting fuel. It may mean the incorporate afr target is not turned on on the basic/load general settings screen. Also on the ego control screen it means the parameters to allow ego control are not being met so it never enters EGO. Hope this helps!
@robbedoes1985
@robbedoes1985 5 жыл бұрын
@@OGPedXing yes might help. My theory was to turn incorp. Target AFR off because if I don't the afr will immediately follow the target when i change something in target afr table because the target AFR are in the fuel calculation when incorp is on. And then EGO correction does not do anything because there won't occur an error between target and measured AFR and so you cant test the response of the EGO algorithm. In my understanding incorp AFR target and EGO correction are 2 different things. Incorp AFR target is just a factor in the fuel calculation. EGO is a algorithm that responds to the difference between afr target and measured afr. Does this make any sense?
@OGPedXing
@OGPedXing 5 жыл бұрын
@@robbedoes1985 you can do it like you're saying with ve analyze live (autotune) but for EGO control it needs incorporate afr. The ve table represents exactly the fuel to be added at a given rpm and load (kpa). It's never wrong relative to itself (unless your injectors aren't working), it just squirts that amount regardless. To be wrong, the afr needs to be inspected. If your ve entry says 40 at a point and the desired afr is 14.7 but observed afr is 14.0 then ego knows to subtract fuel. It will then do this in line with your PID configuration up to the level of authority it has. So 10% means it will subtract up to 4 from that ve entry in real time. Good PID configuration helps it do that quickly without overshooting and going lean.
@robbedoes1985
@robbedoes1985 5 жыл бұрын
Yoy. Tried again. Turned on incorp. AFR Target. And reduced ego delay after start. Re-did the 2,10,20 etc P settings change. And toggled AFR target. EGO correction followed the changes nice, the higher P the faster the response but it never started oscillating. Also not with a prop gain of 200. Any idea why no oscillation is happening? What do you use for Lambda averaging lag factor in general settings and ignition events per step in ego settings?
@willroski5514
@willroski5514 5 жыл бұрын
As someone who has never messed with PID, I learned nothing
@OGPedXing
@OGPedXing 5 жыл бұрын
Hmm.. ok well in tuning you want to reach various targets as quickly as possible but without overshooting. This is what a PID algorithm does. When done with an understanding of the fundamentals, it will be far superior to basic modes in your tuner app.
Tuning the Megasquirt (Pt 6.) - Boost Tuning
28:33
OGPedXing
Рет қаралды 19 М.
Tuning the Megasquirt (Pt. 1) - Intro
13:49
OGPedXing
Рет қаралды 87 М.
A pack of chips with a surprise 🤣😍❤️ #demariki
00:14
Demariki
Рет қаралды 55 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 23 МЛН
FOOLED THE GUARD🤢
00:54
INO
Рет қаралды 62 МЛН
Tuning the Megasquirt (Pt 2) - Idle Control
30:07
OGPedXing
Рет қаралды 74 М.
AFR Closed Loop and AFR Target Table Setup
10:37
Andy Whittle
Рет қаралды 64 М.
Tuning the Megasquirt (Pt 8.) - Electronic Boost Control
20:33
Tuning Closed Loop Idle Settings - Tuner Studio
13:30
BMF Garage
Рет қаралды 9 М.
How to tune a PID Controller
18:14
PID Explained Team
Рет қаралды 98 М.
MegaMeet 2014 Tech Session 4: Acceleration Enrichment
17:19
DIYAutoTune
Рет қаралды 26 М.
Tuning the Megasquirt (Pt 9.) - Electronic Boost Control 2
27:31
Open and Closed Loop AFR Control
10:26
Andy Whittle
Рет қаралды 19 М.
PIDs Simplified
13:07
SiieeFPV
Рет қаралды 286 М.
Basic Idle Control and Fixing a Rolling/Hunting Idle
13:53
Andy Whittle
Рет қаралды 47 М.
Водитель был в шоке от увиденного #дуракинадороге #shorts
0:16
ПРУЖИННЫЙ ДВИГАТЕЛЬ - Как это устроено?
12:03