image thumbnail

Hair, vibrissae, whisker mechanical model

by

 

Simulation of vibrissae mechanical model.

hair_model_data.m
%% Initial values for HAIR MODEL

%% basics values
sections_num=6; % number of links 
skin_springs_num=6; % inside skin

ax=1; ay=1; % ax, ay describe functions (feature option)
x0=10^-3; y0=10^-3; % from origin (skin inner section) 

E = 5*10^6;  % [N/m^2] 3.79-5.35 .Yang elastity modulus
E_skin = 18*10^6; % [N/m^2]

% fiber properties
R=50*10^-6; % fiber Radius 34-360
ro=1.3*1000; % fiber density [N/m]

hair_length=0.02;
hair_mass = ro*hair_length;
init_bending=pi/1000;  % initial hair bending example =pi/sections_num; 

% Muscle Parameters
k_muscle=0;
damp_muscle=0;
spring_len_muscle=0;

% Applied Force 
freq=1; % Sinus Signal Frequency

%% skin tension
springs_vec_x=linspace(0,x0, skin_springs_num/2)';
springs_vec_y=linspace(0,y0, skin_springs_num/2)';
springs_xy=[springs_vec_x springs_vec_y];
spring_len=0;
offset_angle=1;
springs_ground=[springs_xy(:,1) spring_len+springs_xy(:,2)...
    zeros(skin_springs_num/2,1)];

%% sections' ends coordinates
vecx = x0 + ax*linspace(0, hair_length, sections_num+1)';
vecy = y0 + ay*linspace(0, hair_length, sections_num+1)';

Lx = [vecx(1:sections_num) vecx(2:sections_num+1)];
Ly = [vecy(1:sections_num) vecy(2:sections_num+1)];

% sections CG coordinates
LCGx = mean(Lx,2);
LCGy = mean(Ly,2);

%% moment of inertia of sections
% I = M*L^2/3
section_len = hair_length/ sections_num;
section_mass = hair_mass/ sections_num;

Ix=ro*R.^2*pi.*section_len^3/3;
Iy=Ix;
Iz=pi*R.^4.*section_len/24;

%% spring properties
k_spring=E*Iz*section_len.^-1; % hair spring coeficient
k_skin = E_skin*sqrt(x0^2+y0^2)*2*R/6; % ??? skin spring coeficient

Imat= zeros(sections_num*3,3);
Imat(1:3:sections_num*3,1)=Ix;
Imat(2:3:sections_num*3,2)=Iy;
Imat(3:3:sections_num*3,3)=Iz;

%% Loop simulation for different frequencies

% hair_model
% freq=[5:40:200];
% warning off
% clc
% for  ii=1:length(freq)
%     set_param('hair_model/Sine Wave', 'Frequency', 'freq(ii)')
%     SimOut = sim('hair_model',20) ;
%     maxAmp(ii)=max(sqrt(Amp.signals.values(:,1).^2+Amp.signals.values(:,2).^2));
% end


Contact us