Jump to content

ldnz

Members
  • Posts

    112
  • Joined

  • Last visited

Everything posted by ldnz

  1. ldnz

    SAM Simulator

    Version History v.928 (2013.04.30) Current version. 9K33M2 OSA-AK (SA-8B Gecko) released. Finally! Very excited and downloading now.
  2. Just had another thought - could combine this with angle of attack and optimise speed for most efficient cruise..
  3. Yep thats another option, but a simple PI controller seems to work fine for steady state flight. To take this further a set of specifications need to be settled on ie: 1) maintain steady speed within 5kn of target 2) achieve the above with climb/dive angles of +/-10 degrees 3) handle a step change of set speed with a settling time of 20 seconds and a maximum overshoot of 5% Obviously these are all made up but if a meaningful specification can be described (and is within the capabilities of the engines/airframe) there are many controller types to be tailored including state/space, fuzzy logic, PID with feed forward, various adaptive control algorithms etc.
  4. Challenge... it's tempting to have a go, but as mentioned with the A10 its an energy battle and you just don't have enough!
  5. Well the beauty of PID is that it can be P/I/D or any combination. In this case I've got it working well enough as a reasonably high gain proportional controller with very limited integral action to lower the steady state error. Still working on some tweaking to the saturation limits of the integral that will hopefully allow more integral action to be applied to achieve a quicker steady state. The next problem is where this is actually useful. At the moment the code runs continuously locking the plane to a fixed speed (in level flight). I've not dug into the scripting possibilities too much yet but I see a use for this if it can be triggered only when the autopilot is engaged as an extra speed hold (as opposed to speed set and achieve) feature. This also allows better control optimisation as it only needs to stabilise for steady state conditions and not worry so much about step response (ie suddenly telling it you want to be 30 kn faster and leaving it to handle the acceleration).
  6. Code is fine - changed KP to 100, KI and KD to 0 and it works nicely as a basic proportional controller. Stable and fast. Now digging out MATLAB to get some charts and tune it properly.
  7. I've used what is basically the same code (optimised for fixed point math) to implement a cruise control on a motorbike - similar problems including a widely variable throttle/torque map.
  8. Adaptive control algorithms generally over complicate the coding problem (and stability if done badly!) for what would probably be limited gains in this system. I would be very surprised if PID was not sufficient for the job. Once the basic loop is stable in both steady state and step response I would consider adding in feed forward terms (for faster step response) - good point about considering altitude as well. The altitude and speed terms can be very broad brush - they would only be used as starting throttle positions for PID to then correct. The basic code given above looks like a correct implementation of the PID algorithm though you may have to play with the integral saturation value. Unfortunately I've not played with LUA in DCS yet! If you could send me the file and a quick guide on where to put it and how to trigger it I'd be happy to play around with fine tuning it. Day off work today! Note: yes outside of physics experiment land nothing is linear - but PID is still the most widely used algorithm out there because a) its well understood and b) its easy to use and c) it works well enough in most situations.
  9. Have a look at the Zeigler-Nichols method of PID tuning - its very effective for systems that are either already in place or too complex to practically model. The short version is that you set the integral and deriv gains to zero, then slowly increase proportional gain until you get the system to a stable oscillation. Once you have that, you use this gain and the frequency of the oscillation to give you starting values for all three gains. This will give you a stable (but not ideal) system with a little overshoot. Its not too hard from there to trim it in perfectly. I see no reason why PID based auto throttle could not be effective in both maintaining a set speed and responding to a change in speed (step response). Once the basic principles are in place additional things such as a bit of feed-forward (ie setting a base throttle amount for a given speed - gets you in the ball park quicker) can be added. I see that wiki page has some notes on Z-N tuning - that should give you the basics.
×
×
  • Create New...