from
saturation function
by Nassim Khaled
This file contains an approximation of the saturation of a function between the values [-1,1].
|
| a_out=satur(a_in)
|
function a_out=satur(a_in)
%satur is an approximation of the saturation of a function between the values [-1,1]
%The main advantage and purpose of designing this simple yet powerful
%function is to obtain a smooth funtion that has a continous derivative.
%It can be easily adjusted to different lower and upper bounds by alterning
%the value "5" in the formula. Play around with it as you desire and as
%suitable to your application.
%It can be used in control applications like sliding mode control (that uses
%the saturation) and other control schemes.
%
% Inputs:
% a_in: the input value
%
%Outputs:
% a_out: the output values
%
% Example:
% a_out=satur(10)
%
%This function is written by :
% Nassim Khaled
% Wayne State University
% Research Assistant and Phd candidate
%If you have any comments or face any problems, please feel free to leave
%your comments and i will try to reply to you as fast as possible.
a_out=(atan(5.*a_in)-atan(-5.*a_in))/(pi);
|
|
Contact us at files@mathworks.com