基于MATLAB的数字小提琴设计

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

ThedesignofadigitalsignalgeneratorandasimpledigitalpianobasedonthematlabAbstractDigitalsignalgeneratorisakindofwaveformgeneratorbasedonsoftwareandhardware,cangenerateavarietyofbasicwaveform.Avarietyofcomplexengineeringsignalisgeneratedbythesuperpositionofthesebasicsignal,soit'swidelyusedinengineeringanalysisandexperimentteaching.MATLABisaverypracticalengineeringsoftwarefordataanalysisandprocessing,itsdataacquisitiontoolboxprovidesaveryconvenientfunctionsandcommandsfordatainputandoutput,anditisconvenientandpracticalinthedigitalsignalprocessing.ThispaperfirstintroducedthedesignprocessofdigitalsignalgeneratorbasedonMATLAB,realizedthespecificmethodstoachievethesimplewaveform(sinesquare,triangle,slope),andthenachievedasimpledigitalpianobythesinne.1.IntroductionWiththedevelopmentofcomputersoftwareandhardwaretechnology,moreandmorerealgoodsfunctionscanberealizedbyacomputer.,thatiswhatweoftensay.Thatthehardwarebecomessoftwarecanreducethecostandmaketheimplementmodifyandsimulationeasier.NowthereisalotofrelativelymaturesoftwaresuchasMATLAB.Basedonthisconsideration,ImadeasimpledigitalgeneratorwithMATLAB,andinordertomakeitlinkedtothepracticalapplication,Imakeasimpledigitalpiano.Ithinkitcanmakeacertainfoundationforfuturelearningandwork.1.1theintroductionofdigitalsignalgeneratorDigitalsignalgeneratorcanproducesine,square,triangle,saw,whitenoise,pulseandstepetc..Digitalsignalscanalsobecalledasdiscretesignal,itonlygivevaluesforafunctionindiscretetime,anditisasequenceofdiscontinuoustemporally.Theintervalofdiscretetimeisuniform,andusettoexpressit.Thevalueoftdeterminedbythesamplingfrequency--Fs.Inordertoensurethesampledsignalcanstaytruetotheoriginalanalogsignalinformation,samplingfrequencymustbeatleast2timesashighasthehighestfrequencycomponentoftheoriginalsignal.Thisisthebasicruleofsampling,calledthesamplingtheorem.Inthispaper,inordertomakedigitalsignalmoreclosetotheoriginalanalogsignal,thesamplingfrequencyisabout20timeshigherthantheoriginalsignalfrequency.TheMATLABprogramprovidesavarietyofcommonbasicsignalgeneratingfunction.Thisdesignsimulatedfourkindsofsignals,threearedirectlyusingthefunctionprovidedbyMATLAB,onlyonesignalisnotacalledfunction,directlywritten.1.2theintroductionofdigitalpianoThepromotionofdigitalpianoinChinabeganineightyyearstwentiethCentury,sofar,thetone,thequality,andtheconvenienceofperformancehavereachedaverymaturestage,withthedevelopmentofintegratedcircuittechnology,theupgradingcankeeptheoriginalstructureremainunchangedbythereplacementofasimplechip.However,thedigitalpianohaveobviousshortcomings:theconcertoproblemsbetwwenitandpiano,orchestrarestricttheuseofdigitalpianoinimportantplaceinmusic,whichgreatlyaffecttheapplicationandpopularizationofdigitalpiano.Thecoordinationofthedigitalpianoandnonelectronicmusicalinstrumentisapressingmattertothecurrentmusicprofessionalsanddevelopersofdigitalpiano.Inthispaper,IdesignasimpledigitalpianobyMATLAB,todeepentheunderstandingofthedigitalpiano.2.Method2.1therealizationofthedigitalsignalgeneratorIfirstanalytheGUIinterfaceofdigitalsignalgeneratoraccordingtotherequirementsofthedesign,andthenentertheguideintheMATLABworkplaceinterfacetoopentheGUIinterface.AndthenbuildagoodspecificinterfaceofdigitalsignalgeneratorintheGUIinterface,andwritethecallbackfunctionofeachwaveformcontrol,savetheMfile.Trytooperate,iftheresultiscorrect,observethesimulationresults.Ifthesimulationofdigitalsignalgeneratorisincorrectresults,checkthecallbackfunctionofthecontrolkey,modifyandsavetheMfile,runagain,andobservethesimulationresults.2.1.1buildtheGUIofthedigitalsignalgeneratorGUIundertheenvironmentofMatlabisauserinterfacecomposedofwindow,cursor,buttons,menus,textandotherobjects.Theuserthroughcertainmethods(suchasamouseorkeyboard)select,activatethesegraphicalobjects,tomakethecomputerproducesomeactionorchangesuchastherealizationofcalculation,drawingetc..Theoperationofagraphicaluserinterfacegenerallyhavetwoparts,firstofall,choosetheappropriategraphicalobjectstoestablishthereasonableGUIinterfaceinaccordancewiththerequirementsofdesign,principle,andtheneed;thenwritethecallbackfunctionofthecontrolsintheMfiletomaketheconstructedGUIinterfacerun.TheGUIinterfaceofthedesignofdigitalsignalgeneratorusegraphicsobjectssuchaspanel,Axes,pushbutton,StaticText,andsimulatefourkindsofsignal:sine,square,triangle,slope.GUIinterfaceofdigitalsignalgeneratorareasfollows:2.1.2thebasicprincipleofthewaveform2.1.2.1therealizationofthesinewavethemathematicalexpressionofsinsignalsareasfollows:)2sin()sin(ftAwtAyamongthem:Afortheamplitude,fforthefrequency,forphase.InMATLAB,becausetheprocessingobjectsarediscretedigitalsignal,discretizatethetimevariableandconstructaonedimensiongroup:0.1:/1:0sft;withthem:fsforthesamplingfrequency.Butthevaluecannotbetoolarge,otherwisethewaveformdisplaywillbeveryslow.thecorrespondingdigitalsignalexpressionofsine:)2sin()(tfnAtnyAftergettingthediscretevaluesoftandy,useplotmappingfunctiontoobtainthecorrespondingwaveformdisplay.2.1.2.2therealizationofsquarewaveThemathematicalexpressionforthesquare

1 / 11
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功