clc,clear all
%Parameters of piezoelectrick stack P.016-80
run 'P_016_80_parametry.m'

% Simulation 
t=1 ;%time of simulation [s] 
R=45000;% external resistive load 
F=106.6; % Síla na amp
F_in=2*1364.3% Síla na stack
delta_x=4e-4;

% Amplifier
k_amp=F_in/delta_x; % stiffnes of amplifier(force transformation) 
ome_amp=2726.9;% natural frequency of amplifier [rad/s]
m_amp=(F/delta_x)/(ome_amp^2); % effective mass of amplifier
b_amp=2*0.02*m_amp*ome_amp;% dumping of amplifier

m=m_eff+m_amp % effective mass

%b_amp=1000;
k_a=12.3e7; % stiffness of amplifier 
C=1.7e-6
run piezoelektricky_genarator_model.slx
sim piezoelektricky_genarator_model.slx