Commit 913682f0 authored by Florian Zapf's avatar Florian Zapf
Browse files

Matlab Filter und Praesentation

parent 40849a70
clear all
close all
%d= importdata('31-07-18-Noise.log');
d= importdata('31-07-18-Standing.log');
% Gyro_Phi_p= d(:,1);
% Acc_Phi=d(:,2);
% Phi_korr=d(:,3);
Gyro_Phi_p= d(500:700,1);
Acc_Phi=d(500:700,2);
Phi_korr=d(500:700,3);
a=[1,-1.9112,0.915];
b=[9.4469e-4,0.0019,9.4469e-4];
Acc_fil = filter(b,a,Acc_Phi);
T=length(Gyro_Phi_p)/200;
t=0.005:0.005:T;
plot(t,Acc_Phi,'LineWidth',1,'Color','r','Linestyle','--')
hold on
plot(t,Acc_fil,'LineWidth',3,'Color','k','Linestyle','-');
legend(...%'Gyro Winkelgeschwindigkeit',...
'original',...
'gefiltert');
%axis([0 1 -10 10])
title('Winkel des Accelerometers mit und ohne IIR-Filter');
xlabel('Zeit in Sekunden');
ylabel('Winkel in Grad');
\ No newline at end of file
clear all
close all
%d= importdata('31-07-18-Noise.log');
d= importdata('31-07-18-Standing.log');
k1=0.995;
k2=1-k1;
% Gyro_Phi_p= d(:,1);
% Acc_Phi=d(:,2);
% Phi_korr=d(:,3);
Gyro_Phi_p= d(500:700,1);
Acc_Phi=d(500:700,2);
Phi_korr=d(500:700,3);
a=[1,-1.9112,0.915];
b=[9.4469e-4,0.0019,9.4469e-4];
Acc_fil = filter(b,a,Acc_Phi);
T=length(Gyro_Phi_p)/200;
t=0.005:0.005:T;
Gyro_Phi(1)= Phi_korr(1);
Phi_korr_2(1)= Phi_korr(1);
Phi_korr_3(1)= Phi_korr(1);
for i=2:length(Gyro_Phi_p)
Gyro_Phi(i)=Gyro_Phi(i-1)+Gyro_Phi_p(i)/200;
Phi_korr_2(i)=k1*(Phi_korr_2(i-1)+Gyro_Phi_p(i)/200) ...
+k2*Acc_Phi(i);
Phi_korr_3(i)=k1*(Phi_korr_3(i-1)+Gyro_Phi_p(i)/200) ...
+k2*Acc_fil(i);
end
%plot(t,Gyro_Phi_p);
plot(t,Gyro_Phi,'LineWidth',2,'Color','k','Linestyle','-');
hold on
%plot(t,Acc_Phi,'LineWidth',1,'Color','r','Linestyle','--')
plot(t,Acc_fil,'LineWidth',3,'Color','r','Linestyle','-');
plot(t,Phi_korr,'LineWidth',2,'Color','b','Linestyle','--');
%plot(t,Phi_korr_2);
plot(t,Phi_korr_3,'LineWidth',3,'Color','g','Linestyle','-');
legend(...%'Gyro Winkelgeschwindigkeit',...
'Gyroskop',...
'Acceleromer gefiltert',...
'Acc + Gyro',...
'Acc gefiltert + Gyro');
axis([0 1 -10 10])
title('Berechnung des korrigierten Winkels');
xlabel('Zeit in Sekunden');
ylabel('Winkel in Grad');
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -124,8 +124,34 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End Stefan
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Flo
\section{Elektronik und Platine}
\section{Elektronik}
\begin{frame}\frametitle{Schaltplan}
\includegraphics[width=\textwidth, left]{./img/Robot-Schematic.pdf}
\end{frame}
\begin{frame}\frametitle{Foto der Schaltung}
\includegraphics[width=\textwidth, left]{./img/Elektronik_Bild.jpg}
\end{frame}
\begin{frame} \frametitle{Leistung und Energie}
\begin{tabular}{p{0.4\textwidth}c}
\begin{tabular}{p{0.4\textwidth}}
\begin{itemize}
\item
\item Aufbau in Breite und Höhe
\item 2 Motoren für "großes" Drehmoment
\end{itemize}
\end{tabular}
& \begin{tabular}{c}
\parbox{0.4\linewidth}{
\includegraphics[width=0.5\textwidth, left]{./img/Roboter_Front.png}
}
\end{tabular}
\end{tabular}
\end{frame}
\section{Sensordaten und Filter}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End Flo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Quirin
\section{Regelung / Implementierung}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment