From: Saad on
Hello,
MY final year project is inertial measuring unit. The first task given to me is to take a sine wave as acceleration and double integrate the sine wave to take displacement out of it, i tried it by following code

clc
clear all
close all
x = 0:0.1:pi;
acc = sin(x);
figure(1)
plot(x,acc,'-');
legend('Acceleration')
vel = cumtrapz(x,acc);
vel = vel - 1;
figure(2)
plot(x,vel,'--');
legend('Velocity obtained by integration')
figure(3)
disp = cumtrapz(x,vel);
figure(3)
plot(x,disp,'--');
legend('Displacement obtained by double integration')


in this code we take a projectile motion and this is acceleration, if we double integrate the acceleration we have to get the displacement but this code does not show the output as DISPLACEMENT along x and y axis, if I want to make it 3D what can I do?
From: John D'Errico on
"Saad " <contract_killer_sadi(a)hotmail.com> wrote in message <hjku30$lii$1(a)fred.mathworks.com>...
> Hello,
> MY final year project is inertial measuring unit. The first task given to me is to take a sine wave as acceleration and double integrate the sine wave to take displacement out of it, i tried it by following code
>
> clc
> clear all
> close all
> x = 0:0.1:pi;
> acc = sin(x);
> figure(1)
> plot(x,acc,'-');
> legend('Acceleration')
> vel = cumtrapz(x,acc);
> vel = vel - 1;
> figure(2)
> plot(x,vel,'--');
> legend('Velocity obtained by integration')
> figure(3)
> disp = cumtrapz(x,vel);
> figure(3)
> plot(x,disp,'--');
> legend('Displacement obtained by double integration')
>
>
> in this code we take a projectile motion and this is acceleration, if we double integrate the acceleration we have to get the displacement but this code does not show the output as DISPLACEMENT along x and y axis, if I want to make it 3D what can I do?

Make WHAT 3D? Where should y come from?
Magic? Out of thin air?

john
From: Lothar Schmidt on
Am 25.01.2010 21:51, schrieb John D'Errico:
> "Saad " <contract_killer_sadi(a)hotmail.com> wrote in message
> <hjku30$lii$1(a)fred.mathworks.com>...
>> Hello,
>> MY final year project is inertial measuring unit. The first task given
>> to me is to take a sine wave as acceleration and double integrate the
>> sine wave to take displacement out of it, i tried it by following code
>>
>> clc
>> clear all
>> close all
>> x = 0:0.1:pi;
>> acc = sin(x);
>> figure(1)
>> plot(x,acc,'-');
>> legend('Acceleration')
>> vel = cumtrapz(x,acc);
>> vel = vel - 1;
>> figure(2)
>> plot(x,vel,'--');
>> legend('Velocity obtained by integration')
>> figure(3)
>> disp = cumtrapz(x,vel);
>> figure(3)
>> plot(x,disp,'--');
>> legend('Displacement obtained by double integration')
>>
>>
>> in this code we take a projectile motion and this is acceleration, if
>> we double integrate the acceleration we have to get the displacement
>> but this code does not show the output as DISPLACEMENT along x and y
>> axis, if I want to make it 3D what can I do?
>
> Make WHAT 3D? Where should y come from?
> Magic? Out of thin air?
>
> john

in former times people with this kind of problem where at least told not
to use built-in function names as variable names.

doc disp
From: Saad on
"Saad " <contract_killer_sadi(a)hotmail.com> wrote in message <hjku30$lii$1(a)fred.mathworks.com>...
> Hello,
> MY final year project is inertial measuring unit. The first task given to me is to take a sine wave as acceleration and double integrate the sine wave to take displacement out of it, i tried it by following code
>
> clc
> clear all
> close all
> x = 0:0.1:pi;
> acc = sin(x);
> figure(1)
> plot(x,acc,'-');
> legend('Acceleration')
> vel = cumtrapz(x,acc);
> vel = vel - 1;
> figure(2)
> plot(x,vel,'--');
> legend('Velocity obtained by integration')
> figure(3)
> disp = cumtrapz(x,vel);
> figure(3)
> plot(x,disp,'--');
> legend('Displacement obtained by double integration')
>
>
> in this code we take a projectile motion and this is acceleration, if we double integrate the acceleration we have to get the displacement but this code does not show the output as DISPLACEMENT along x and y axis, if I want to make it 3D what can I do?






HELLO JOHN,
Okey man seriously i know nothing about IMU and this is a forced project upon me, basically i have to design an IMU(inertial measuring unit) for this people uses accelerometer and gyroscope. But my project is to design without using gyro. so i have to double integrate the acceleration signal to find out the displacement in all the three axis. so initially the task is to take any signal(sin,cos,decaying signal,amp varing signal, wavelength varying signal) and do the integration. THE CONCEPT IS " if u integrate the acceleration u get the velocity and if u double integrate it u got the displacement...." so IF U KNOW ANY THING ABOUT THIS PLZ HELP ME.