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
dbForge Studio for PostgreSQL 2.3.212
HTMLPad 2020 16.2
WeBuilder 2020 16.2
Rapid CSS 2020 16.2
Rapid PHP 2020 16.2
C# HTML to PDF 2020.8.1
Flowrigami 1.0.0.1
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
Top Code
IcrediBB Bulletin Board System 1.0
dbForge Studio for PostgreSQL 2.3.212
Ez Paypal Clone 7.4.2
Paypal Clone Script 1.0.9
Quick Maps For Dynamics CRM 3.1
Chowtro - Online Restaurant Food Ordering Software 1.0
Online Food Ordering System 1.3.2
Spire.Presentation 2.0
xpControls 1.4
Solid File System OS edition 5.1
Open Source for Visual Studio 9 9
Advanced Presentation Tools Collection 3.III
diskMETA-Lite
PortalNest: Dynamics CRM Customer Portal 1.0
MATLAB video tutorial in Czech - Lesson 4: Complex numbers and polynomials 1.0
Top Rated
Uber Clone with Safety Measure Addons 2.0
Answers phpSoftPro 3.12
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
Apphitect Airbnb Clone Script 1.0
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
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