Be the first to rate this file! 10 downloads (last 30 days) File Size: 4.79 KB File ID: #6354

UnWrapper

by Giampiero Campa

 

19 Nov 2004 (Updated 24 Nov 2004)

Code covered by the BSD License  

Unwraps angles so that continuity is restored.

Download Now | Watch this File

File Information
Description

Normally, the output of functions that return angles (e.g. atan2) is strictly constrained within the range 0 to 2*pi or within the range -pi to pi.

Therefore, even if the inputs change continuously, the angle will exhibit 2*pi jumps across the limits, which is sometimes undesirable (e.g. when the angle drives a control system).

This block unwraps an input angle to the whole real axis so that it does not make 2*pi jumps anymore.

In order to distinguish jumps from normal behavior, an upper bound on the maximum time derivative of the input is assumed.

Required Products Simulink
MATLAB release MATLAB 5.3.1 (R11.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
simulink Giampiero Campa 22 Oct 2008 07:36:10
angle Giampiero Campa 22 Oct 2008 07:36:10
wrap Giampiero Campa 22 Oct 2008 07:36:10
unwrap Giampiero Campa 22 Oct 2008 07:36:10
phase Giampiero Campa 22 Oct 2008 07:36:10
atan2 Giampiero Campa 22 Oct 2008 07:36:10
atan Giampiero Campa 22 Oct 2008 07:36:10
jumps Giampiero Campa 22 Oct 2008 07:36:10
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com