NTC热敏电阻温度采集方案
NTC温度采集方案,有详细的算法,包括一些程序,硬件设计等SUNPLUS用热敏电阻做朵用温度月录页系统概要系统说明热敏电阻器1.2.1电阻一温度关系1.3数值处理线性插值软件说明软件说明2档案构成2.3程序说明程序范例DEMO程序使件原理佟使用资源硬件使用资源说明参考文献SUNPLUS用热敏电阻做朵用温度修订记录版本日期编写及修订者编写及惨订说明初版错误校SUNPLUS用热敏电阻做朵用温度系统概要系统说明木应用例实现ⅳrC热敏电阻器对温度的测量。热敏电阻器把温度的变化转换为电阻阻值的变化,再应用相应的测量电路把阻佶的变化转换为电压的变化;SPMC75F2413A内建8路ADC可以把模拟的电压值转换为数字信号,对数值信号进行处理可以得到相应的温度值。热敏电阻器热敏电陧有电阻值随温度升高而升高的正温度系数(3 ositive Tcmpcraturc Coefficient简称PC)热敏电阻和电阻值随温度升高而降低的负温度系数( Negative TemperatureCoefficient简称NTC)热敏电阻。NT~热敏电阻器,是·种以过渡金属氧化物为主要原材料,采用电了陶瓷⊥艺制成的热敏半导体陶瓷组件ε这种组件的电阻值随温度升髙而降低,利用这一特性可制成测温、温度补偿和控温组件,又可以制成功率型组件,抑制电路的浪涌电流。电阻温度特性可以近似地用下式来表示:式中:Rη、R分别表示NTC在温度T(K)和额定额定温度T(K)卜的电阻值,单位2,T、T为温度,单位K(Ts(k)-273.15+T(℃))。B,称作B值,NTc热敏电阻特定的材料常数(Beta)。由于B值同样是随温度而变化的,因此NT热敏电阻的实际特性,只能粗略地用指数关系来描述,所以这种方法只能以一定的精度来描述额定温度或电阻值附近的有限的范围。但是在实际应用中,要求有比较精桷的R-T曲线。要用比较复杂的方法(例如用thesteinhart-Hart方程),或者用表格的形式来给定电阻/温度关系应用例选用NC热敏电阻器CwF2-502F3950,基于精确的R-T曲线,来对温度进行精确的测量。电阻一温度关系如表1-1所示,NC热敏电阻器CwE2-502F3950各温度点的电阻值,即电阻一温度关系表。从提供的电阻一温度关系表中可以看出NTC热敏电阳器CWE2-502E3950的测温范围为[-55℃,125℃],其电阻值的变化范围为[25006292,242.6492]。表1-1电阻一温度关系衣温度℃电阻值Ω温度℃电阻值Q温度℃电阻值Q55250062542374045322523952213575120241219175C4918158018171895-471626844615393345l∠56384∠1377534313029342123231-4111655CSUNPLUS用热敏电阻做朵用温度4010232391042613898621.793295.53688267.43583521.83479043.93374819.23270833.93167074.730635292960184.6-2857030.22754054.72651247.9-25486002446101.6234374422415192139418.82037435.9-1935563.51833795-1732124.463C545.829053.827643.3-1326309.525047.91123854.2-1022724,621655.320642.719683.618774.917913.6417097.116332.915588.4111891.5014230113601.913005.412438.7l1900.111388.210901.310438.39997.74578.41109181113799128436.83133091.73147762.787449.16167150.C4176864.7592.4196332.49206C34.32215847.31225620.89235404,53245197.72255000264810.9274630.014456.93294291.283C4132.69313980.83323835.383696.03343562.193434.53194.1383C81.22392972.92402869412769.24422673.47432581.5442493.17452408.3462326.76472248.38482173.04492100.6502032511963.92521899.441837.4541777,6已1720.2561664.85571611.541560.2591510.746C1463.08611417,14621372.87631330.18641289.C21249.321211.03671174.C91138.44691104.04701070.83711C38.78721007.8273977.9374949,0675921.1776894.22868.1878843.027980795.1781772.4382750.4483729.1784708.685688.786669.4487650.88632.76SUNPLUS用热敏电阻做朵用温度89615.39C91582.0292566.179550.8194535.9495521.5396507.5797∠94.0598480.9499468.23100453.301443.9710243210321.15104410.26105399.69106389.4407379.5103369.85109360.48101,411112.57112334.01325.69114317.62115309.7716302.16117294.76118287.5719280.59120273.8121267.21122260.8123254.512L248.52125242.64数值处理通过表1-1电阻一温度关系表可以很直观的看到电阻的变化范围从242.649到2500629,在-55℃的时候其表现出的电阻值是125℃时所表现的电阻值的1030倍,这幺大的变化范围也为ADC测量带来了困难。测量电路如图1-1所示。如图1-1测量电路如上图所示NTC热敏电阻Rⅴ和测量电阻Rm(精密电阻)组成一个简单的串联分压电路,参考电压VCC Ref经过分压可以得到一个电压值随着温度值变化而变化的数值,这个电压的大小将反映出NTC电阻的人小,从而也就是相应温度值的反映。通过欧姆定律可以得到输出电压值Vadc和NTc电阻值的一个关系表达式:vadVre上+Rm/(Rv+Rm)那幺接下来的数据处理将基于式(1)展开:sPMC75F2413A的ADC为10-Bit的精度,其参考电SUNPLUS用热敏电阻做朵用温度压为5V,因此这里可以选择Vre£=5V。各温度点对应的ADC转换后的数字量可以计算。Dadc = 1024*Adc/5V(2)式(1)、(2)结合可以得到:Dadc 1024*Rm/(Rv+Rm)(3)如果这里取测量电阻Rm选择4.7K9,那幺可以计算出在-55℃时所对应的Dadc=1024*1000/(250062+100C)=4;在125℃时所对应的Dadc=1024*1000/(242.64+10C0)824。根据这样的对应关系对数据进行预处理,得到如下处理结果如表1-2所示:表1tatic const Int16 NTCTAB2[18119,20;21,22,23,24,26,27,29,30,32;34,36,38,40,42,44,47,49,52,55,57,61;64,67,71,74,78,82,86,90,95,99,104,109114120,150,156,161,168,172,180,187,194,201,208,215,22,230,238,247255,264,272,280,291,302,310;319328,338;347,357367,376,384;395,4C5,414r424;434444,453,464,47448,494,502;512,522,531,540,551,560,569,579,586;595,604,613,624,633,642,650;658,666,673,680,688:696,704,712,719,726,733,741;749,755,760,767,774,780,785,791,798,804,811,816,8827,832,837,842;847,851,856;862,868,873,856;860,64,868,872,376;879,883,886;890,893,896,899;902,905,908,911,914;917,919,922;924,927,929,931;934,936,938,940,942,94,946,947,949,951,953,954,956,958,959,961,962;964,965,966,968,969,970,971,973,974};//4.7K当然这也是应用例中所需要的一个很重要的转换表,这一部分是事先制作好的表格,将为接下来的处理提供参考依据。测量电阻Rm的选取是有一定的规律的,在实际的应用中不一定都需要测量全程温度,可以估算岀大致的温度范围。木着提高测量精度的宗旨:如果是应用在测量低温的系统中建议Rπ选择较大的电阻(10KΩ),如果在测量较高温的系统中建议Rn选择较小的电阻(1κΩ)等。线性插值在AEC进行数据采集的过程中不可能每个数值都在整温度所对应的AD数值上,所以如果在两个数据的中间一段就要对其进行进一步的精确定位。这样就必须知道采集到的数据在表1-2中的具体位置,因此要对数据表进行搜索、查找。线性表的查找(也称枍索),可以有比较常见的顺序查找、折半查找及分块查找等方法,分析线性表1-2可以得到折半查找的算法是比较高效的。Eg如果ADC采样的数值为Dade=360,即357
- 2020-12-04下载
- 积分:1
Adaptive Filters
自适应滤波器的权威Sayed的大作,用大量的实例诠释自适应滤波器的各种算法原理,是不可多得的好书。ADAPTIVE FILTERSADAPTIVE FILTERSALIH SAYEDUniversity of California at Los Angeles◆旧EEEIEEE PressWIlEYNTERSCIENCEA JOHN WILEY SONS, INC, PUBLICATIONCover design by Michael RutkowskiCopyright C 2008 by John Wiley Sons, Inc. All rights reservedPublished by John Wiley Sons, Inc, Hoboken, New JerseyPublished simultaneously in CanadaNo part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or bymeans, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under anySection 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of thePublisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center,Inc, 222 Rosewood Drive, Danvers, MA01923, (978)750-8400, fax(978)750-4470, or on the web atwww.copyright.comRequeststothePublisherforpermissionshouldbeaddressedtothePermissionsDepartment, John Wiley sons, Inc, 111 River Street, Hoboken, NJ,(201)748-6011, fax(201)748-6008,oronlineathttp:/www.wiley.com/go/permissionLimit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts inpreparing this book, they make no representations or warranties with respect to the accuracy or completeness ofe contents of this book and specifically disclaim any implied warranties of merchantability or fitness for aarticular purpose. No warranty may be created or extended by sales representatives or written sales materialsThe advice and strategies contained herein may not be suitable for your situation. You should consult with aprofessional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or anyother commercial damages, including but not limited to special, incidental, consequential, or other damagesFor general information on our other products and services or for technical support, please contact our CustomerCare Department within the United States at(800)762-2974, outside the United States at (317)572-3993 or fax(317)572-4002Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not beavailable in electronic formats. For more information about wiley products, visit our web site atwww.wlley.conLibrary of Congress Cataloging-in-Publication Data:Sayed, Ali hAdaptive filters/Ali H. Sayedp cmIncludes bibliographical references and indexISBN9780470-25388-5( cloth)Adaptive filters. I. TitleTK7872F5s285200862138l5324dc222008003731Printed in the united states of america10987654321To my parentsContentsPrefacexviiNotationXXVAcknowledgmentsXXXBACKGROUND MATERIALA Random variablesA 1 Variance of a random variableA2 Dependent random VariablesA3 Complex-Valued Random VariablesA 4 Vector -Valued Random variables3467A.5 Gaussian Random VectorsB Linear Algebra12B. Hermitian and Positive- Definite matricesB 2 Range spaces and nullspace of matrices14B3 Schur Complements16B 4 Cholesky factorizationB 5 QR DecompositionB6 Singular Value Decomposition20B 7 Kronecker productsC Complex Gradients25C 1 Cauchy-Riemann Conditions5C2 Scalar arguments26C3 Vector arguments26PART:。 PTIMAL ESTIMATIONScalar- Valued Data291. 1 Estimation Without observations1.2 Estimation Given Dependent observations1.3 Orthogonality Principl36CONTENTS1,4 Gaussian random variables382 Vector- Valued Data422. 1 Optimal Estimator in the vector Case422.2 Spherically Invariant Gaussian Variables462. 3 Equivalent Optimization Criterion49Summary and Notes51Problems and Computer Projects54PART I: LINEAR ESTIMATION3 Normal Equatlons603. 1 Mean-Square Error Criterion613.2 Minimization by Differentiation3.3 Minimization by Completion-of-Squares633.4 Minimization of the error Covariance matrix653.5 Optimal Linear estimator4 Orthogonality princlple4. 1 Design Examples4.2 Orthogonality Condition4.3 Existence of solutions744, 4 Nonzero-Mean variables5 Linear Models5.1 Estimation using Linear Relations5.2 Application: Channel Estimation5Application: Block Data Estimation815. 4 Application: Linear Channel equalization825.5 Application: Multiple-Antenna Receivers85Constralned estimation876.1 Minimum-Variance Unbiased estimation6.2 Example: Mean Estimation6.3 Application: Channel and Noise Estimation916.4 Application: Decision Feedback Equalization6.5 Application: Antenna Beamforming1017 Kalman Filter1047.1 Innovations process7.2 State-Space Model106
- 2020-12-09下载
- 积分:1