Board index FlightGear Development

Generating Phugoid and Dutch Modes using FLIGHT GEAR

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Re: Generating Phugoid and Dutch Modes using FLIGHT GEAR

Postby chaitanya » Sat Jan 29, 2011 3:46 am

what all languages do i need to learn to write a code of my own . and how to start off with my code ( i meant which file do i need to starting looking at first )


or may be i have an idea of writting a code with all the steps of genenrating the phugoid manually ( step / step procedure of the setting up the trim point as i have the values of the trim points and next by pulling back the yoke for a second or two and bring back to the neutral point and i want to put the alpha , beta and gamma = 0 so that it wont turn or undergo spiral )


is it possible to generate such mode.
chaitanya
 
Posts: 15
Joined: Sun Jan 16, 2011 11:45 am

Re: Generating Phugoid and Dutch Modes using FLIGHT GEAR

Postby biffbutkus1 » Fri Feb 04, 2011 1:59 am

Not sure why you want to rewrite code that is already doing what you are asking for, as Curt and several others have told you that FlightGear ALREADY calculates the aircraft states that will demonstrate the dutch roll and phugoid modes. What you need to do is excite these modes and plot the states so that you can calculate the frequency and damping ratios. To excite the dutch roll mode you can write a Nasal script to create a rudder doublet...OR you can download JSBSim Matlab/SFunction and use Simulink to create the doublet and its plotting utilities to graph the output roll and yaw angles. This is precisely one of the scenarios I envisioned when I developed the SFunction...
Level D Flight Sim Tech in Japan
biffbutkus1
 
Posts: 101
Joined: Sun Aug 10, 2008 2:44 pm
Location: Plano, TX

Re: Generating Phugoid and Dutch Modes using FLIGHT GEAR

Postby biffbutkus1 » Sat Feb 05, 2011 11:00 pm

To expand on this some more, you will probably want to linearize about a trim condition. Once you have the resulting decoupled state space matrices, put these into the appropriate Simulink blocks and hit the longitudinal dynamics with a throttle doublet, the lateral dynamics with a rudder doublet. Plot the states you are interested in looking at (perhaps theta, yaw angle etc.)
Level D Flight Sim Tech in Japan
biffbutkus1
 
Posts: 101
Joined: Sun Aug 10, 2008 2:44 pm
Location: Plano, TX

Re: Generating Phugoid and Dutch Modes using FLIGHT GEAR

Postby jentron » Mon Apr 25, 2011 3:22 pm

So this morning I was using JSBSim/stand-alone to test roll stability by applying a 10% aileron deflection for 5 seconds. I was quite pleased to see the aircraft roll back to wings level. I was less pleased to see a nasty phugoid oscillation had developed. I came across this thread while searching for a way to damp the phugoid faster than its damping now. The y scale on the graph is seconds so my period is about 80 seconds.Image

I should mention the dips in the first 5 seconds are the autotrim routine setting up level flight.
Aircraft: F-4E, Cessna 182RG, Fi-156 Storch, Diamond DA20 Katana and Eclipse, Ercoupe, LZ-129, Gossamer Albatross
Airports: CYKF, CNC4, KHIF, 42U, KOXB, 4MD1
jentron
 
Posts: 453
Joined: Thu Jul 26, 2007 3:41 am
Version: custom
OS: Linux

Re: Generating Phugoid and Dutch Modes using FLIGHT GEAR

Postby curt » Mon Apr 25, 2011 4:49 pm

If your aircraft is starting out in straight and level trimmed flight and then you roll the aircraft, the trimmed lift vector now is not being applied directly down so there is an imbalance and the aircraft will naturally nose down and start accelerating. When you level the wings your full lift vector will now be applied all vertically. All this excites the phugoid and it will take some time to dampen out.

If you don't want this, then you have to have some active control of your elevator to hold your altitude at your original trimmed state (and it needs to be pretty well tuned to avoid dipping anyway.)

Hope that helps.

Curt.
curt
Administrator
 
Posts: 1168
Joined: Thu Jan 01, 1970 1:00 am
Location: Minneapolis, MN

Re: Generating Phugoid and Dutch Modes using FLIGHT GEAR

Postby chaitanya » Wed May 04, 2011 4:43 am

Hi ,
This is chaitanya i was pleased to know that someone similar to me has been working on high angle of attack modes(testing of roll stability) , i wanted to know how to give aileron deflection with time and how to plot these alpha , beta , theta and psi , phi etc values on graphs using JSBSIM/stand-alone (you posted in my request form) . i would be glad if you help me with a nice tutorial of generating the roll stability
chaitanya
 
Posts: 15
Joined: Sun Jan 16, 2011 11:45 am

Re: Generating Phugoid and Dutch Modes using FLIGHT GEAR

Postby jentron » Wed May 04, 2011 4:52 am

This graph was generated by kst from JSBSim stand-alone using the JetStar-II FDM I'm working on. It is available from the gitorious repository here:
https://gitorious.org/syd-s-flightgear-content/jetstar-ii and the command line used was:
Code: Select all
JSBSim --script=aircraft/Jetstar-II/Resources/jetstar_cruise.xml --logdirectivefile=data_output/commonstuff.xml&& sed 's/ //g' -i commonstuff.csv


The sed command is required because KST doesn't like spaces in csv files.

commonstuff.xml isn't in JSBSim's codebase, so I'll include it here:
Code: Select all
<?xml version="1.0"?>
<output name="commonstuff.csv" type="CSV" rate="10">
  <property> aero/alpha-deg </property>
  <property> aero/beta-deg </property>
  <property> aero/qbar-psf</property>
  <property> aero/qbarUW-psf</property>
  <property> aero/qbarUV-psf</property>
  <property> position/h-sl-ft</property>
  <property> velocities/vc-kts</property>
  <property> velocities/mach</property>
  <property> attitude/phi-rad</property>
  <property> attitude/theta-rad</property>
  <property> attitude/psi-rad</property>
  <property> attitude/roll-rad</property>
  <property> attitude/pitch-rad</property>
  <property> attitude/heading-true-rad</property>
  <property> aero/coefficient/Cmadot</property>
  <property> aero/coefficient/Cmalpha</property>
  <property> aero/coefficient/Cmde</property>
  <property> aero/alphadot-rad_sec</property>
  <property> fcs/elevator-pos-rad </property>
  <property> fcs/left-aileron-pos-rad </property>
  <property> fcs/rudder-pos-rad </property>
</output>
Aircraft: F-4E, Cessna 182RG, Fi-156 Storch, Diamond DA20 Katana and Eclipse, Ercoupe, LZ-129, Gossamer Albatross
Airports: CYKF, CNC4, KHIF, 42U, KOXB, 4MD1
jentron
 
Posts: 453
Joined: Thu Jul 26, 2007 3:41 am
Version: custom
OS: Linux

Re: Generating Phugoid and Dutch Modes using FLIGHT GEAR

Postby chaitanya » Wed May 04, 2011 6:48 am

I haven't obtained the data output of FG ,
first I have to input the parameters of aileron deflection and time parameters in the JSBSIM and then go for kst in jsbsim ???

could you please help me out with the initial steps of obtaining the stability derivatives .
chaitanya
 
Posts: 15
Joined: Sun Jan 16, 2011 11:45 am

Generating Phugoid and short-period Modes using FLIGHT GEAR

Postby n1bhatt » Sun Nov 27, 2016 4:39 am

I am working on Cessna 172 . My query is How to generate Phugoid and Short period modes for Cessna 172 . I know FlightGear calculates the aircraft states that will demonstrate the phugoid mode.

What I need to do to excite these modes and plot the states so that you can calculate the frequency and damping ratios.

Is there any script or something ? please help , I am very new to this stuff.


Thanks
Nb
n1bhatt
 
Posts: 2
Joined: Sun Nov 27, 2016 3:53 am

Previous

Return to Development

Who is online

Users browsing this forum: No registered users and 6 guests