Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Vue Injector 3.3
Spectrum Analyzer pro Live 2019
Devart Excel Add-in for HubSpot 2.1
RentALLScript - Airbnb clone 2.2
SuiteCRM Theme Customization 7.11.6
iScripts NetMenus 3.1
iScripts EasyIndex 2.2
iScripts EasySnaps 2.0
Australia MyPost shipping For Magento 2 1.0.0
Australia Post eParcel For Magento 1.1.1
Source Control for SQL Server 2.0
Answers phpSoftPro 3.12
Exlcart 2.0
School College ERP 1.3.2
White-label Grocery Delivery App Solution 2.0
Top Code
iScripts EasySnaps 1
iScripts EasyIndex 1
iScripts NetMenus 2.0
ATN Site Builder 3.0
Azizi search engine script PHP 4.1.10
IcrediBB Bulletin Board System 1.0
JE Guestbook 1.1
Cover Flow FX 0.2.12
Current Location 1.5.9
Guestbook PHP Script 1.1
DBForms from MSAccess to PHP+PostgreSQL 1.0.0
Simple Comments Script 0.930
Vue Injector 3.3
EV Widget Post 0.3
ATN Resume Finder 2.0
Top Rated
phpEnter 5.1.
Quick Maps For Dynamics CRM 3.1
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
16-bits fixed-point PID implementations in C 1.0
File ID: 79120






16-bits fixed-point PID implementations in C 1.0
Download 16-bits fixed-point PID implementations in C 1.0http://www.mathworks.comReport Error Link
License: Freeware
File Size: 20.5 KB
Downloads: 60
Submit Rating:
16-bits fixed-point PID implementations in C 1.0 Description
Description: The effect of fixed-point arithmetic in 16-bits PID controller C routines
on the closed-loop precision is shown in this Simulink model.

Two Simulink blocks that implement single and double
precision 16-bits PID C routines are generated with the LCT. The C sources
are supplied for user modifications if required.

Controllers work with 16-bits data and coefficients word lengths. Coefficients
and data fixed-point numbers have respectively 12-bits and 10-bits fractionnal part.

For a reference step excitation, you will see that the permanent errors for
the fixed-point pids do not equal zero. Without rounding (look inside model
for rounding mode switching), the single precision pid exibits an error about
8 data lsb when the double precision one is just around 2 lsb.
After changing the rounding mode to "nearest", the single precision
implementation error falls to 3 lsb !

Look inside the code sources and you will see that the differences are i) the
internal controller state is stored in double precision and ii) the downcasts
(right shifts) are not done at the same point in the fixed-point computation.

License: Freeware

Related: switching, modelfor, exibits, Error, Double, about8, inside, rounding, permanent, excitation, errors, forthe, Equal, lsbafter, stored, state, downcastsright, shifts

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 20.5 KB

Downloads: 60



More Similar Code

This simulation illustrates the effects of the fixed-point
computations on the closed-loop precision for a 16-bits PID controller.
The rounding mode, the point where the truncations take place and the
format width for the internal variable have a significant action on the
closed-loop permanent error.

Three versions of the same PI(D=0) controller are
implemented : i) double (floating point), ii) 16 bits...



A fixed point math header-library for C, under a liberal license.



Functions accompanying MATLAB News & Notes article "Fixed-point Signal Processing: Getting Started" by Darel A. Linebarger and Thomas A. Bryan, 2004. The functions include an FIR filter in M that can be run in fixed-point and...



LongDecimal provides a numeric type for fixed point arithmetic, similar to (but with more features) Java's BigDecimal, but different from Ruby's BigDecimal. Such a numeric type allows controlling how rounding is performed, for example for finance...



An essential step in embedded software development, floating- to fixed-point conversion can be tedious, labor-intensive, and error-prone. System engineers frequently design algorithms in floating-point math, usually double-precision. This format...



Demo files used in "Simulink Fixed-Point Tutorial R2008a (Japanese)".



There are challenges to face when programming in fixed-point code manually. Similarly, care is required in automatically generating fixed-point code. The developer must pay attention to design tradeoffs, namely: accuracy, efficiency, ROM, RAM,...



There are challenges to face when programming in fixed-point code manually. Similarly, care is required in automatically generating fixed-point code. The developer must pay attention to design tradeoffs, namely: accuracy, efficiency, ROM, RAM,...



API for User Written Fixed-Point and Floating-Point S-Functions.
A supplement to Release 13 of Simulink and Fixed-Point Blockset.

Version 0.9.0 Beta 1
January 8, 2003

Feedback on this beta should be sent to



A beginner's guide to threading in C# is an easy to learn tutorial in which the author discusses about the principles of multi threading, which helps in executing multiple operations at a same time. The author offers details about how the multi...

User Review for 16-bits fixed-point PID implementations in C
- required fields
     

Please enter text on the image