已阅读5页,还剩25页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
基于labview的 apple watch 系统的设计沈 阳 工 程 学 院虚拟仪器课 程 设 计设计题目:基于labview的apple watch系统的设计 系 别 自动化 班级 测控132 学生姓名 学号 指导教师 职称 讲师 起止日期: 2016年 2月29日起至2016年3月11日止中 文 摘 要随着电子技术、计算机技术和数字信号处理技术的发展,以及它们在测量领域中的广泛应用,新的测试理论、测试方法以及测试仪器的不断出现。仪器的概念及其设计理论正在发生着巨大的变化,虚拟仪器受到越来越多的关注。虚拟仪器是计算机技术和仪器测量技术相结合的产物,它充分利用计算机强大的运算处理功能,突破了传统仪器在数据处理、显示、传输、存储等方面的限制。本文利用虚拟仪器平台,通过编写labview软件对 apple watch 进行虚拟仿真,减少硬件的重复开发,有利于系统的维护,也便于系统软件升级。利用虚拟仪器技术不仅简化了系统硬件,软件实现也很方便,同时图形化的显示使结果更直观、准确,并给出了模拟的系统程序。且相对于传统的标准仪器来说,labview由于是基于软件的,所以提供了更大的灵活性。通过labview开发的虚拟仪器是由用户而不是仪器生产商定义仪器功能的。一台计算机、数采板卡和labview的结合就能够变成一个可配置的虚拟仪器来完成用户设定的任务。通过labview就可以用传统仪器几分之一的价格创建一个用户所需要的虚拟仪器,可以大量节约成本。关键词 : labview apple watch 计时 传感目 录中 文 摘 要v1 设计任务描述11.1 设计题目:基于labview的apple watch系统的设计11.2 设计要求11.2.1 设计目的11.2.2 基本要求11.2.3 发挥部分12 设计思路23 设计方框图34 各部分电路设计及参数计算44.1 主面板设计44.1.1设计思路44.1.2 设计程序图44.2 数据转换子vi设计54.2.1 设计思路54.2.2 设计程序图54.3 主程序设计64.3.1 设计思路64.3.2 天气系统程序图64.3.3 航班信息系统程序图74.3.4 音乐播放系统程序图74.3.5 心跳测量系统程序图84.3.6 计步系统程序图84.3.7 录音系统程序图94.3.8 闹钟系统程序图94.6 daq数据采集104.6.1 daq数据采集框图104.6.2 daq数据采集结果104.5 运行结果图115 工作过程分析13小 结14致 谢15参考文献16附 录 a 程序框图一17附 录 b 程序框图二18附 录 c 程序框图三19- iii -1 设计任务描述1.1 设计题目:基于labview的apple watch系统的设计1.2 设计要求设计apple watch界面,显示时间。l 设计连接天气、航班信息、播放音乐、测量心跳、计步、闹钟等功能键,及相关子界面及功能程序设计。1.2.1 设计目的 熟悉labview开发环境,掌握基于labview的虚拟仪器原理、设计方法和实现技巧,运用专业课程中的基本理论和实践知识,采用labview开发工具,实现电子时钟的设计和仿真。要求通过本课程设计使学生熟悉labview开发环境,掌握基于labview的虚拟仪器设计原理、设计方法和实现技巧,使学生掌握通信系统设计和仿真工具,为毕业设计做准备,为将来的学习及今后从事科学研究、工程技术工作打下较坚实的基础。 1.2.2 基本要求(1)设计apple watch界面,显示时间。(2)设计连接天气、航班信息、播放音乐、测量心跳、计步、闹钟等功能键,及相关子界面及功能程序设计。1.2.3 发挥部分(1) 设计音乐选择功能(2) 设计录音功能2 设计思路通过可以获取时间的控件获取时间信息,并时时显示在主面板上。天气、航班信息、播放音乐、测量心跳、计步等功能键用布尔控件进行设置,然后通过数据转换子vi将其转换为特定的数值信息;将数值信息传输的主程序vi,通过主程序vi的事件结构进行相应的功能选择并运行相应的程序;最后将得出的结果写入缓存文本文档,通过读取程序显示在主面板上。天气系统:首先将数据信息写入数据库,然后通过字符串搜索控件搜索相应的信息。航班信息:类似天气系统,区别在于搜索内容不同。测量心跳:心跳和脉搏都是震动信息,震动就会产生声音,通过声音采集控件对声音信息进行收集,通过单频测量控件测量其频率,然后进行数值转换就可以计算出心跳。计步系统:由于人行走是一个减速度瞬间增加并瞬间减小的过程,所以用加速度传感器测量加速度信息,然后经过滤波器滤波,滤去频率过高和过低的信号,然后通过电压比较器消除噪声影响,每得到一个符合条件的信号就计数加一。闹钟系统:通过比较控件,对字符串进行比较,相等时蜂鸣器鸣叫。播放音乐:通过事件结构对歌曲进行选择,播放声音控件播放音乐。录音系统:通过声音采集控件对声音进行采集,然后通过写入声音控件对声音进行写入,用播放声音系统进行播放。3 设计方框图主面板布尔信息数据转换数字选择信息主程序功能选择闹钟系统录音系统计步功能心跳测量音乐播放航班信息天气查询结果信息存储读取结果信息主面板4 各部分电路设计及参数计算4.1 主面板设计4.1.1设计思路通过开关输出布尔信号,然后经过布尔至(0,1)转换控件将信号传输到子vi中进行下一步的处理,同时将闹钟开关信息及定时时间传输到系统时间子vi中;然后通过读取文本信息控件对文本内容进行读取,及通过字符串搜索对文本内容进行查询,最后显示输出结果;结果显示后清空文本数据缓存避免程序出错。4.1.2 设计程序图图4.1-1 主面板设计图4.2 数据转换子vi设计4.2.1 设计思路该部分程序主要是对(0,1)布尔信号进行处理,我们选用加法将输入的字符串信号转换为特定的数值信号,以用于作为事件结构的输入端,对触发事件进行选择;选择触发事件后程序将输出特定的数字量,将此数字量传输到主程序vi中用以选择程序实现的功能。4.2.2 设计程序图图4.2-1 数据转换设计图4.3 主程序设计4.3.1 设计思路通过对数据转换子vi的输出的数据进行读取选择运行的程序,其中天气搜索程序通过将数据库写入文本文档进行缓存,然后通过主面板的搜索控件进行数据搜索;航班信息系统与之类似,区别只在于数据库不同;音乐播放系统通过对音乐播放控件写入播放集控件对声音信息进行收集,通过单频测量控件测量其频率,然后进行数值转换就可以计算出心跳;计步系统:由于人行走是一个减速度瞬间增加并瞬间减小的过程,所以用加速度传感器测量加速度信息,然后经过滤波器滤波,滤去频率过高和过低的信号,然后通过电压比较器消除噪声影响,每得到一个符合条件的信号就计数加一来进行计步;闹钟系统:通过比较控件,对字符串进行比较,相等时蜂鸣器鸣叫;录音系统:通过声音采集控件对声音进行采集,然后通过写入声音控件对声音进行写入,用播放声音系统进行播放。4.3.2 天气系统程序图 天气系统采用了提前将天气信息输入数据库中得方法,通过读取文本信息的方法读取文本文件,然后将该文本信息保存到数据缓存文本中,经过主面板的读取文本信息控件和搜索字符串控件查询文本信息,如图4.3-1。4.3-1 天气系统设计图4.3.3 航班信息系统程序图 航班信息系统需要提前将航班信息输入数据库中得,然后通过读取文本信息的方法读取文本文件,然后将该文本信息保存到数据缓存文本中,经过主面板的读取文本信息控件和搜索字符串控件查询文本信息,如图4.3-2。4.3-2 航班信息系统设计图4.3.4 音乐播放系统程序图 音乐播放系统运用了音乐播放控件,通过对地址输入控件进行赋值进行音乐播放,其中音乐播放时间采用系统延时进行播放时间控制,同时此程序可以通过主面板的数值输入控件进行歌曲的选择,并通过将字符串写入数据缓存文本在主面板上显示歌曲名称,如图4.3-3图4.3-3 音乐播放系统设计图4.3.5 心跳测量系统程序图 由于无论是心脏跳动还是脉搏波动都是震动,震动就会产生声音,心跳测量系统采用声音采集的方法采集心跳波动信息,并以单频测量控件测量信号频率,将频率乘60即为心跳一分钟跳动的次数,如图4.3-4。4.3-4 心跳测量系统设计图4.3.6 计步系统程序图 因为人体自身行走,即便是匀速行走也是一个加速度瞬间增大然后瞬间减小的过程,通过检查人体行走的加速度大小是否大于某一个特定值,如果大于即计数加一可以对人体行走信息进行监测,如图4.3-5。图4.3-5 计步系统设计图4.3.7 录音系统程序图 录音系统采用声音采集的方法,将采集到的声音信息写入.wav文件中,然后可以使用音乐播放功能将录下的声音信息进行播放,如图4.3-6。4.3-6 录音系统设计图4.3.8 闹钟系统程序图 闹钟系统首先采用获取当前时间控件获取当前时间,然后通过格式化时间/日期字符串控件显示时间信息;将时间信息字符串进行不同的截取连接然后与主面板输入的控制信息进行比较,通过布尔至(0,1)转换控件将布尔信息与闹钟开关信息进行比较,将此值输入到蜂鸣器的使用系统警报端控制蜂鸣器鸣叫,如图4.3-7。4.3-7 闹钟系统设计图4.6 daq数据采集4.6.1daq原理数据采集(daq)原理为:从传感器和其它待测设备等模拟和数字被测单元中自动采非电量或者电量信号,送到上位机中进行分析,处理。以作为某些设备的输入。4.6.1 daq数据采集框图图4.6.1 daq数据采集框图4.6.2 daq数据采集结果daq数据采集结果图4.5 运行结果图图4.4-1 天气系统结果图与4.4-2 航班信息系统结果图图4.4-3 音乐播放系统结果图4.4-4 心跳测量系统结果图4.4-5 计步系统结果图4.4-6 录音系统结果图5 工作过程分析 通过开关输出布尔信号,并将信号传输到子vi中进行下一步的处理,通过对数据转换子vi的输出的数据进行读取选择运行的程序,其中天气搜索程序通过将数据库写入文本文档进行缓存,然后通过主面板的搜索控件进行数据搜索,以及通过读取文本对字符串进行显示输出结果;航班信息系统与之类似,区别只在于数据库不同;音乐播放系统通过对音乐播放控件写入播放地址来播放音乐;测量心跳:心跳和脉搏都是震动信息,震动就会产生声音,通过声音采集控件对声音信息进行收集,通过单频测量控件测量其频率,然后进行数值转换就可以计算出心跳;计步系统:由于人行走是一个减速度瞬间增加并瞬间减小的过程,所以用加速度传感器测量加速度信息,然后经过滤波器滤波,滤去频率过高和过低的信号,然后通过电压比较器消除噪声影响,每得到一个符合条件的信号就计数加一来进行计步;闹钟系统:通过比较控件,对字符串进行比较,相等时蜂鸣器鸣叫;录音系统:通过声音采集控件对声音进行采集,然后通过写入声音控件对声音进行写入,用播放声音系统进行播放。小 结 过一星期的labview课程设计,对一学期来学习的labview的基本操作和编程技巧有了进一步的掌握,labview作为一门新式的以图形化编程的语言,不仅提供了简单易学的编程方法,而且提供了海量的可调用的模块,涉及到各个方面。labview应用领域广泛,我们可以十分方便地找到各种适用于测试测量领域的labview工具包。这些工具包几乎覆盖了所需的所有功能,在这些工具包的基础上设计程序相对于其他编程方法显得容易多了,这也让我对这门课程产生了更加浓厚的兴趣。labview包含多种多样的数学运算函数,特别适合进行模拟、仿真、原型设计等工作。在设计机电设备之前,可以现在计算机上用labview搭建仿真原型,验证设计的合理性,找到潜在的问题。使用labview进行软件模拟,可以达到同样的效果,使我们获得实践的机会,同是也大大缩短程序开发时间。 通过一个学期的学习,我深刻地体会到labview的高效,对这种编程语言有很大的兴趣。在课程设计的这样一星期里,我把教材又看了一遍,还在网上查了不少资料,从中学到了大量的技巧。不过在设计过程中也越来越感到,labview入门很容易,深入做下去,完成一个像样的工程,还得懂得各方面的知识,进一步的学习和掌握。这是一门实践性很强的课程,很多知识是从书上看来的,而且看完之后,自己还觉的不错,觉得自己已经掌握的很好了,但真到实际做东西的时候,就会觉得困难重重,这时再去查书,便有了对知识的更深层次的理解。 致 谢 在这次虚拟仪器课程设计中我学到了很多知识,锻炼了自己的能力,感谢我的指导老师雷老师在此次课程设计中给予我的指导,也感谢我的同学对我的热心帮助。 在这次课程设计中中,雷老师在虚拟仪器课程设计实践经验给我们许许多多的帮助,在我们面对问题时对我们的耐心指导,对我们不会的问题进行了耐心的知道,非常感谢老师对我的帮助。 在此我还要感谢的是我们组的所有成员,在我们组中每一个成员都细心的研究与相互探讨,在不懂的时候我们都耐心的探讨和查阅资料,直到解决问题为止。在我们的相互研究与探讨中我们增长了知识学到了不少的东西,在我们的相互帮助中我们才能顺利完成我们的课程设计任务所以我要感谢他们。 这次课程设计不仅让我开阔了视野,拓宽了思路,增长了学识,而且为我今后的工作和学习打下了牢固的基础。最后,我要再次感谢我们的指导老师雷老师,谢谢您对我们的帮助和支持。祝您在今后的工作生活中一帆风顺,事事顺心。参考文献【1】侯国屏,王坤,叶齐鑫.labview7.1编程与虚拟仪器设计,清华大学出版社【2】刘君华.基于labview的虚拟仪器设计.电子工业出版社,2003【3】邓岩,王磊磊测试技术与仪器应用机械工业出版社,2004【4】杨乐平,李海涛,杨磊labview课程设计与应用电子工业出版社,2005【5】雷勇虚拟仪器设计与实践电子工业出版社,2005 【6】吴义满,袁淑女.基于labview闹钟的设计.电子设计工程 ,electronic design engineering ,2013年18期 【7】刘光普,李效东,梁莺,任雍.基于labview的天气预报系统.电子测量术 ,electronic measurement technology ,2014年07期 附 录 a 程序框图一主面板程序框图附 录 b 程序框图二数据转换程序框图附 录 c 程序框图三主程序框图天气系统程序框图航班信息系统程序框图音乐播放系统程序框图心跳采集系统程序框图计步系统框图录音系统框图系统时间程序框图请删除以下内容,o(_)o谢谢!the origin of taxation in the united states can be traced to the time when the colonists were heavily taxed by great britain on everything from tea to legal and business documents that were required by the stamp tax. the colonists disdain for this taxation without representation (so-called because the colonies had no voice in the establishment of the taxes) gave rise to revolts such as the boston tea party. however, even after the revolutionary war and the adoption of the u.s. constitution, the main source of revenue for the newly created states was money received from customs and excise taxes on items such as carriages, sugar, whiskey, and snuff. income tax first appeared in the united states in 1862, during the civil war. at that time only about one percent of the population was required to pay the tax. a flat-rate income tax was imposed in 1867. the income tax was repealed in its entirety in 1872. income tax was a rallying point for the populist party in 1892, and had enough support two years later that congress passed the income tax act of 1894. the tax at that time was two percent on individual incomes in excess of $4,000, which meant that it reached only the wealthiest members of the population. the supreme court struck down the tax, holding that it violated the constitutional requirement that direct taxes be apportioned among the states by population (pollock v. farmers loan & trust, 158 u.s. 601, 15 s. ct. 912, 39 l. ed. 1108 1895). after many years of debate and compromise, the sixteenth amendment to the constitution was ratified in 1913, providing congress with the power to lay and collect taxes on income without apportionment among the states. the objectives of the income tax were the equitable distribution of the tax burden and the raising of revenue. since 1913 the u.s. income tax system has become very complex. in 1913 the income tax laws were contained in eighteen pages of legislation; the explanation of the tax reform act of 1986 was more than thirteen hundred pages long (pub. l. 99-514, oct. 22, 1986, 100 stat. 2085). commerce clearing house, a publisher of tax information, released a version of the internal revenue code in the early 1990s that was four times thicker than its version in 1953. changes to the tax laws often reflect the times. the flat tax of 1913 was later replaced with a graduated tax. after the united states entered world war i, the war revenue act of 1917 imposed a maximum tax rate for individuals of 67 percent, compared with a rate of 13 percent in 1916. in 1924 secretary of the treasury andrew w. mellon, speaking to congress about the high level of taxation, stated, the present system is a failure. it was an emergency measure, adopted under the pressure of war necessity and not to be counted upon as a permanent part of our revenue structure. the high rates put pressure on taxpayers to reduce their taxable income, tend to destroy individual initiative and enterprise, and seriously impede the development of productive business. ways will always be found to avoid taxes so destructive in their nature, and the only way to save the situation is to put the taxes on a reasonable basis that will permit business to go on and industry to develop. consequently, the revenue act of 1924 reduced the maximum individual tax rate to 43 percent (revenue acts, june 2, 1924, ch. 234, 43 stat. 253). in 1926 the rate was further reduced to 25 percent. the revenue act of 1932 was the first tax law passed during the great depression (revenue acts, june 6, 1932, ch. 209, 47 stat. 169). it increased the individual maximum rate from 25 to 63 percent, and reduced personal exemptions from $1,500 to $1,000 for single persons, and from $3,500 to $2,500 for married couples. the national industrial recovery act of 1933 (nira), part of president franklin d. roosevelts new deal, imposed a five percent excise tax on dividend receipts, imposed a capital stock tax and an excess profits tax, and suspended all deductions for losses (june 16, 1933, ch. 90, 48 stat. 195). the repeal in 1933 of the eighteenth amendment, which had prohibited the manufacture and sale of alcohol, brought in an estimated $90 million in new liquor taxes in 1934. the social security act of 1935 provided for a wage tax, half to be paid by the employee and half by the employer, to establish a federal retirement fund (old age pension act, aug. 14, 1935, ch. 531, 49 stat. 620). the wealth tax act, also known as the revenue act of 1935, increased the maximum tax rate to 79 percent, the revenue acts of 1940 and 1941 increased it to 81 percent, the revenue act of 1942 raised it to 88 percent, and the individual income tax act of 1944 raised the individual maximum rate to 94 percent. the post-world war ii revenue act of 1945 reduced the individual maximum tax from 94 percent to 91 percent. the revenue act of 1950, during the korean war, reduced it to 84.4 percent, but it was raised the next year to 92 percent (revenue act of 1950, sept. 23, 1950, ch. 994, stat. 906). it remained at this level until 1964, when it was reduced to 70 percent. the revenue act of 1954 revised the internal revenue code of 1939, making major changes that were beneficial to the taxpayer, including providing for child care deductions (later changed to credits), an increase in the charitable contribution limit, a tax credit against taxable retirement income, employee deductions for business expenses, and liberalized depreciation deductions. from 1954 to 1962, the internal revenue code was amended by 183 separate acts. in 1974 the employee retirement income security act (erisa) created protections for employees whose employers promised specified pensions or other retirement contributions (pub. l. no. 93-406, sept. 2, 1974, 88 stat. 829). erisa required that to be tax deductible, the employers plan contribution must meet certain minimum standards as to employee participation and vesting and employer funding. erisa also approved the use of individual retirement accounts (iras) to encourage tax-deferred retirement savings by individuals. the economic recovery tax act of 1981 (erta) provided the largest tax cut up to that time, reducing the maximum individual rate from 70 percent to 50 percent (pub. l. no. 97-34, aug. 13, 1981, 95 stat. 172). the most sweeping tax changes since world war ii were enacted in the tax reform act of 1986. this bill was signed into law by president ronald reagan and was designed to equalize the tax treatment of various assets, eliminate tax shelters, and lower marginal rates. conservatives wanted the act to provide a single, low tax rate that could be applied to everyone. although this single, flat rate was not included in the final bill, tax rates were reduced to 15 percent on the first $17,850 of income for singles and $29,750 for married couples, and set at 28 to 33 percent on remaining income. many deductions were repealed, such as a deduction available to two-income married couples that had been used to avoid the marriage penalty (a greater tax liability incurred when two persons filed their income tax return as a married couple rather than as individuals). although the personal exemption exclusion was increased, an exemption for elderly and blind persons who itemize deductions was repealed. in addition, a special capital gains rate was repealed, as was an investment tax credit that had been introduced in 1962 by president john f. kennedy. the omnibus budget reconciliation act of 1993, the first budget and tax act enacted during the clinton administration, was vigorously debated, and passed with only the minimum number of necessary votes. this law provided for income tax rates of 15, 28, 31, 36, and 39.6 percent on varying levels of income and for the taxation of social security income if the taxpayer receives other income over a certain level. in 2001 congress enacted a major income tax cut at the urging of president george w. bush. over the course of 11 years the law reduces marginal income tax rates across all levels of income. the 36 percent rate will be lowered to 33 percent, the 31 percent rate to 28 percent, the 28 percent rate to 25 percent. in addition, a new bottom 10 percent rate was created. since the early 1980s, a flat-rate tax system rather than the graduated bracketed method has been proposed. (the graduated bracketed method is the one that has been used since graduated taxes were introduced: the percentage of tax differs based on the amount of taxable income.) the flat-rate system would impose one rate, such as 20 percent, on all income and would eliminate special deductions, credits, and exclusions. despite firm support by some, the flat-rate tax has not been adopted in the united states. regardless of the changes made by legislators since 1913, the basic formula for computing the amount of tax owed has remained basically the same. to determine the amount of income tax owed, certain deductions are taken from an individuals gross income to
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论