Rocket simulation

Discussions on high/extreme altitude and mach busting rockets.

Moderator: Moderators

kir
Parachute Packer
Parachute Packer
Posts: 13
Joined: Wed Aug 19, 2015 6:57 pm
Location: Warner QLD

Rocket simulation

Postby kir » Wed Sep 09, 2015 1:46 pm

I have done a bit of rocket simulation using X-Plane/Matlab, and I hope the model I designed might be useful for someone else.

The X-Plane simulator unlike many others is not just a game, it does calculate aerodynamics on surfaces, perhaps correctly even on 1+ Mach. It also has an open IP interface, which allows easily to plug it in your controlling software.

The model is designed for simulations only, so you won't be able to fly it with a joystick. The rocket has four controllable canards attached to the elevator1, elevator2, rudder1, rudder2 controls with max deflection 15 degrees.The length is about 4 feet and the weight is about 0.5kg empty, up to 1.5 kg with fuel.
Attachments
Screen Shot 0.jpg
Screen Shot 1.jpg
Screen Shot 2.jpg
rocket.zip
The Rocket model for XPlane 10
(165.64 KiB) Downloaded 56 times

User avatar
kopius
Elle3
Elle3
Posts: 2846
Joined: Mon Apr 23, 2007 4:30 pm
Location: Gold Coast, Queensland
Contact:

Re: Rocket simulation

Postby kopius » Fri Sep 18, 2015 7:32 pm

That looks really neat. I would take a wild punt that the rocket would be unstable in typical 'model' flying with the canard positioning and size of the fins. Great for a missile with active guidance though (very similar to a sidewinder).

Have you put the data into Open Rocket at all?
QRS Secretary

AMRS #3 L3 ACO
Life member of QRS

NAR L2 #98260

MDRA Member #0241

High Impulse
Rocket Crew
Rocket Crew
Posts: 281
Joined: Wed Dec 17, 2014 6:06 pm

Re: Rocket simulation

Postby High Impulse » Fri Sep 18, 2015 7:36 pm

How did you integrate MatLab into the simulation? I have done a little bit with it but wasn't all that keen on doing any more. However, if i can use it for rocketry i may learn it after all.

Cheers,

Adam.
L1: Callisto - H410VM

Lister
Engineer
Engineer
Posts: 967
Joined: Fri Jun 05, 2015 5:36 pm
Location: Bendigo, Victoria

Re: Rocket simulation

Postby Lister » Fri Sep 18, 2015 7:43 pm

Thats cool.. can it accurately model a model rocket flight/stability?

User avatar
kopius
Elle3
Elle3
Posts: 2846
Joined: Mon Apr 23, 2007 4:30 pm
Location: Gold Coast, Queensland
Contact:

Re: Rocket simulation

Postby kopius » Fri Sep 18, 2015 9:26 pm

Lister wrote:Thats cool.. can it accurately model a model rocket flight/stability?


MOST DEFINITELY!! Open Rocket is one of the most advanced simulations programs available and best of all it is completely free. Crazy enough, this is not one of those too good to be true moments, Sampo (the original writer) simply did an amazing project and has shared it with the rest of the rocketry community.
QRS Secretary

AMRS #3 L3 ACO
Life member of QRS

NAR L2 #98260

MDRA Member #0241

Lister
Engineer
Engineer
Posts: 967
Joined: Fri Jun 05, 2015 5:36 pm
Location: Bendigo, Victoria

Re: Rocket simulation

Postby Lister » Fri Sep 18, 2015 9:39 pm

Sorry I should have been clear.. was meaning the X-plane/Matlab programs... I have OR.. its the main reason I fire up my pc these days.. even have the android version.. brilliant program, couldnt believe it was free

kir
Parachute Packer
Parachute Packer
Posts: 13
Joined: Wed Aug 19, 2015 6:57 pm
Location: Warner QLD

Re: Rocket simulation

Postby kir » Sat Sep 19, 2015 9:14 am

Yep, I tested both with active guidance and at a "model" flight. The "model" flight is actually quite stable with this geometry - it only starts flattering when the speed is close to/over Mach. Surprisingly even with very rough atmospheric conditions, a guided flight does not give much altitude gain (something about 5%). However, it could be due to not too precise simulation.

Matlab could be easily linked to XPlane. Xplane is fully controlled via UDP communication, and there are native means in Matlab to send/receive UDP packets.
Here is an example:

Code: Select all

% open connection
u = udp('127.0.0.1', 'RemotePort', 49000, 'LocalPort', 49005);
fopen(u);

% create and send a command to choose airport
packet0 = zeros(1,25);
packet0(1:5)   = ['P' 'A' 'P' 'T' 0];
packet0(6:13)  = ['K' 'S' 'E' 'A' 0 0 0 0]; % SEATLE
packet0(14:17) = typecast(uint32(601),'uint8'); 
packet0(18:21) = typecast(uint32(0),'uint8');
packet0(22:25) = typecast(uint32(0),'uint8');
fwrite(u, packet0);

kir
Parachute Packer
Parachute Packer
Posts: 13
Joined: Wed Aug 19, 2015 6:57 pm
Location: Warner QLD

Re: Rocket simulation

Postby kir » Sat Sep 19, 2015 9:18 am

I have not tried Open Rocket yet. No doubts, it would be interesting to compare the flight stability.

The XPlane suppose to model aerodynamics quite accurately. But it is designed for big birds, so when I simulate 1-metre object, there could be precision issues...


Return to “Higher, Faster, Further”

Who is online

Users browsing this forum: No registered users and 1 guest