Gains tuning

28 views
Skip to first unread message

Divit Rohan

unread,
Jan 25, 2020, 2:18:33 AM1/25/20
to uavdevboard
Hello guys, 


I'm using x-plane 10 with UDB to make hardware in the loop simulation, and all is well... 
in the manual mode, the plane behave normally like a real flight, but when I switch the 3-mode switch to the stabilized mode the plane 
doing as a crazy plane and it is totally no stable, in option.h files there are several gains:
 
for roll control : 
#define ROLLKD 0.05 
#define ROLLKP 0.20

 for pitch control :

#define PITCHGAIN 0.30 #define PITCHKD 0.00

for yaw control : 

#define YAWKP_RUDDER 0.30
#define YAWKD_RUDDER 0.00
How these parameters adjusts the stability level of the plane?  and what is the procedure to varying these parameters to get a perfect stabilized mode? (:   

thank you
Ohans
 

Peter Hollands

unread,
Jan 25, 2020, 5:09:22 AM1/25/20
to uavdevboard
Ohans,

Before you start flying, you need to check the Frames Per Second (FPS)  that X-Plane 10 is providing.
You need to have the FPS running at atleast 40FPS for HILSIM to work correctly.
When first testing my own setup, I try to run with as high a frame rate as possible (60-70FPS), with minimum objects and detail.
Once that is working, I then improve my graphics to have FPS of about 45 to 50.

In my experience if your FPS is below 40 e.g. 25 or 35, then HILSIM will faill when in fly by wire or autonomous mode.

There are videos and article son how to adjust X-Plane 10 FPS by adjusting the number of objects displayed, and rendering detail in the graphics menus of X-Plane 10.

Also, make sure you switch off any AI aircraft that might fly around the simulator. They can seriously drop the FPS rate during a flight.

If you are flying a standard X-Plane 10 plane from their menu, then please say what it is, as other people may already have a working options.h for the plane you are flying.

The most important first setup of options.h is to make sure that the control surfaces are all moving in the right direction. The direction of the Fly By Wire (Stabilized mode) control and Autnomous control  may need reversing in options.h.

When you start X-Plane 10, let the plane sit on the runway or taxi area for about 5 seconds before powering up your uavdevboard. Always power up the uavdevboard after X-Plane 10 has started it's simulation. If you have paused the X-Plane 10 simulation, it is best un-pause, then move the flight back to the start of the runway or taxi area, then re-start the uavdevboard. I say all this principally because it can take a long long time for the uavdevboard to readjust it's heights after un-pausing the simulator.

That is all I have time to say just now. Other's can chip in on how to adjust the Gains.

Best wishes, Pete



--
--
---
You received this message because you are subscribed to the Google Groups "uavdevboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uavdevboard...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/uavdevboard/8d2f334a-dfcd-463f-a6a0-3923b12f07f3%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages