D.R. Dialog Simulation for Background Characters

合集下载

2对话框驱动及应用实例

2对话框驱动及应用实例

2)等腰梯形对话框驱动程序(dytx.lsp)
(defun c:tx (/ id)
(setq id (load_dialog "d:\\shili\\dytx"))
(if (< id 0) (exit))
(if (not (new_dialog "dytx" id)) (exit))
(image1 "tx1" "d:\\shili\\dytx")
功能:开始对话框并接受用户输入。在调用 该函数之前,你必须通过(new_dialog)函数来 初始化。同时这个对话框必须在一个动作表 达式或一个返回函数调用(done_dialog)函数之 前,一直保持激活状态。
17) start_image函数
格式:(start_image 控件操作名)
功能:在图像控件中开始建立图像。应当与 函数(end_image)成对使用,在这两个函数之 间可以调用(fill_image), (slide_image)和 (vector_image)等函数建立图像。
(done_dialog)") (start_dialog) (unload_dialog id) (if (> what 0) (draw_zdbx n r flag)) );end
带圆正多边形绘图及数据读取函数
(defun draw_zdbx (n r flag)
(setq bp (getpoint "\nBase point:"))
} ok_cancel; }
2) 对话框驱动程序设计(htf.lsp)
例2、 带圆正多边形对话框驱动
1) 对话框设计程序(zdbx.dcl)

Dialog样式主题标题背景使用【总结】

Dialog样式主题标题背景使用【总结】

Dialog样式主题标题背景使⽤【总结】最重要的是这两⾏代码dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);//设置Dialog没有标题,需在setContentView之前设置dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);//设置Dialog背景透明效果MainActivitypublic class MainActivity extends ListActivity {protected void onCreate(Bundle savedInstanceState){super.onCreate(savedInstanceState);String[] array = {"不指定Dialog的主题,指定Activity使⽤系统定义的主题", //"指定Dialog使⽤系统定义的主题", //"设置Dialog⽆标题、背景透明效果", //"设置AlertDialog背景透明效果", };setListAdapter(new ArrayAdapter<String>(this, yout.simple_list_item_1, new ArrayList<String>(Arrays.asList(array))));}@Overrideprotected void onListItemClick(ListView l, View v, int position, long id){switch(position){case 0:startActivity(new Intent(this, Activity1.class));break;case 1:startActivity(new Intent(this, Activity2.class));break;case 2:Dialog dialog = new Dialog(this);//直接设置对话框主题dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);//设置Dialog没有标题。

Android对话框Dialog深度剖析

Android对话框Dialog深度剖析

Android对话框Dialog深度剖析Dialog 类是对话框的基类,但您应该避免直接实例化Dialog,而是使用下列子类之一:AlertDialog此对话框可显示标题、最多三个按钮、可选择项列表或自定义布局。

DatePickerDialog 或TimePickerDialog此对话框带有允许用户选择日期或时间的预定义UI。

避免使用ProgressDialogAndroid 包括另一种名为ProgressDialog 的对话框类,可显示具有进度条的对话框。

不过,如需指示加载进度或不确定的进度,则应改为遵循进度和Activity 的设计指南,并在您的布局中使用ProgressBar。

这些类定义您的对话框的样式和结构,但您应该将DialogFragment 用作对话框的容器。

DialogFragment 类提供您创建对话框和管理其外观所需的所有控件,而不是调用Dialog 对象上的方法。

使用DialogFragment 管理对话框可确保它能正确处理生命周期事件,如用户按“返回”按钮或旋转屏幕时。

此外,DialogFragment 类还允许您将对话框的UI 作为嵌入式组件在较大UI 中重复使用,就像传统Fragment 一样(例如,当您想让对话框UI 在大屏幕和小屏幕上具有不同外观时)。

注:由于DialogFragment 类最初是通过Android 3.0(API 级别11)添加的,因此本文描述的是如何使用支持库附带的DialogFragment 类。

通过将该库添加到您的应用,您可以在运行Android 1.6 或更高版本的设备上使用DialogFragment 以及各种其他API。

如果您的应用支持的最低版本是API 级别11 或更高版本,则可使用DialogFragment 的框架版本,但请注意,本文中的链接适用于支持库API。

使用支持库时,请确保您导入的是android.support.v4.app.DialogFragment 类,而不是android.app.DialogFragment。

ADS原理图版图联合仿真Cosimulation_with_layout

ADS原理图版图联合仿真Cosimulation_with_layout

ADS Co-simulation w/ Layout ComponentsBreaking Down Barriers Between Electrical & Physical domainsAgenda• Current design flow challenges • Improved circuit/EM co-simulation w/ Layout Components • Detailed Set up & Usage of Layout Components • Application Examples • SummaryTitle of Presentation 1 March, 2001Agilent RestrictedPage 2Current Design Flow ChallengesI need to simulate my LNA design. But I am worried about the physical parasitics of the layout. I wish I can work these issues out now instead of having to tweak design later on.Title of Presentation 1 March, 2001 Agilent RestrictedI will set up the layout and perform a Momentum EM simulation and send it to you to use along side your circuit design.Page 3Issues and Challenges with Physical DesignNow, which pin connects to which pin??? Did he perform the EM simulation to my specs???I wish there was an easier way to co-simulate circuit and physical parasitics in the schematic environment!!!!Title of Presentation 1 March, 2001 Agilent Restricted Page 4Agenda• Current design flow challenges • Improved circuit/EM co-simulation w/ Layout Components • Detailed Set up & Usage of Layout Components • Application Examples • SummaryTitle of Presentation 1 March, 2001Agilent RestrictedPage 5New in ADS 2002! Co-simulate w/ Layout ComponentsWow! This is like working in Layout, but it’s not; we are still in the SchematicLayout Component is a scaled version of the layout drawing. It is automatically generated and available in the ADS library as a component! It can also be simulated with a measured data file. This new feature allows a more transparent integration of physical design parasitics at the schematic design levelTitle of Presentation 1 March, 2001 Agilent Restricted Page 6Co-simulate w/ Layout Components BenefitsSo, you are telling me that with new Layout Components I get: •EM-Circuit co-simulation from the schematic environment •Include physical layout parasitics at the schematic design level •Seamless integration of Momentum EM technology in the standard design flow •Momentum simulation options accessible from schematic environment •User defined Layout Components’ symbol size & min/max pin-pair spacing •Compiled Layout Components listed in project’s network directory •Model database for multiple models for each componentYes. Let me show you how it works...Title of Presentation 1 March, 2001 Agilent Restricted Page 7Agenda• Current design flow challenges • Improved circuit/EM co-simulation w/ Layout Components • Detailed Set up & Usage of Layout Components • Application Examples • SummaryTitle of Presentation 1 March, 2001Agilent RestrictedPage 8Generating Layout Components Dialog BoxSymbol: A scaled copy of the layout shape is created. Set min or max pin-pin distance, or layout units.3Model: These parameters will be available in schematic. They are a subset of the Momentum simulation setup.Database: When the component is created, a citifile is created from the last dataset and stored in the model database.Title of Presentation 1 March, 2001Agilent RestrictedPage 9Generating Layout Components Symbol SizeIn this case, Port 18 & 19 (two closest ports), will have 1 schematic unit (1 inch by default) of separation in the Layout Component.This option is desired when the Layout Component thought will encompass schematic symbols (ie discrete resistors, capacitors, etc…)Title of Presentation 1 March, 2001Agilent RestrictedPage 10Generating Layout Components Symbol SizeIn this case, the maximum pin-to-pin spacing of the Layout Component will measure 1 schematic unit (1 inch by default).This option is recommended if user plans on using many layout components along side schematic components.Title of Presentation 1 March, 2001 Agilent Restricted Page 11Generating Layout Components Symbol SizeIn this case, layout unit dimensions are mapped to scaled schematic unit dimensionsThis option is recommended when combining different layout components on the same schematic page.Title of Presentation 1 March, 2001 Agilent Restricted Page 12Generating Layout Component Model TypeMomentum modeling top options can be set at this time or later during use at the schematic levelMomentum modeling options include the following:Title of Presentation 1 March, 2001Agilent RestrictedPage 13Generating Layout Component Model Model DatabaseDifferent simulation results can be associated with a layout component, e.g., to keep track of simulations done with different Momentum parameters, or Momentum modes (MW or RF). Models already available for a component can be viewed in the layout component Model Database dialog. Selection and deselection of the models to be deleted can be done using the arrows or using the Select All or Unselect All buttons.Title of Presentation 1 March, 2001 Agilent Restricted Page 14Using Layout Component in SchematicComponent is inserted from ADS library: Double click:Ref: The reference pin is created as a voltage reference for all the other pins of the component. Typically connected to ground, it can also be used to simulate floating grounds.Also, push / pop if schematic subcircuit exists!Title of Presentation 1 March, 2001 Agilent Restricted Page 15Component Parameters & File SettingsReuse Model: The Model Database is queried for the Model Parameter values. If available, it will reuse database citifile during the circuit simulation. If NOT available (for example: a broader frequency sweep), a new model will be generated by invoking the Momentum simulator automatically - then it will be added to the Model Database.Changing settings results in Momentum re- simulation!File Based model: You can also choose any Sparameter file (Dataset, CITIFILE, or Touchstone) or ADS Netlist file and the model database is ignored. For example, you can use measured data for one simulation and then use the Momentum MW or RF for a second simulation to compare results!Next, circuit simulation...Title of Presentation 1 March, 2001 Agilent Restricted Page 16Agenda• Current design flow challenges • Improved circuit/EM co-simulation w/ Layout Components • Detailed Set up & Usage of Layout Components • Application Examples • SummaryTitle of Presentation 1 March, 2001Agilent RestrictedPage 17Layout Component Simulation SetupUse any other ADS simulator: AC, HB, Transient, etc.Title of Presentation 1 March, 2001Agilent RestrictedPage 18S-parameter Simulation - TuningTitle of Presentation 1 March, 2001Agilent RestrictedPage 19Transient SimulationTitle of Presentation 1 March, 2001Agilent RestrictedPage 20Agenda• Current design flow challenges • Improved circuit/EM co-simulation w/ Layout Components • Detailed Set up & Usage of Layout Components • Application Examples • SummaryTitle of Presentation 1 March, 2001Agilent RestrictedPage 21Summary• Layout Components allow for seamless and intuitive EM/Circuit co-simulation in schematic • Transparent integration of electromagnetic simulators at the schematic design level schematicLayout setup • Momentum simulation options accessible from Layout Component Generation• Compiled Layout Components available in ADS library • Model database for multiple models for each Layout Component ADS circuit simulationTitle of Presentation 1 March, 2001Agilent RestrictedPage 22。

维宏雕刻机英文版软件英汉词典

维宏雕刻机英文版软件英汉词典

维宏雕刻机英文版软件英汉词典——北京天通数码郑,2006.12.22一、单词和短语:2D plt depth 二维PLT加工深度AAbout NcStudio 关于NcStudioAcceleration 加速度Advanced functions 高级加工指令Advanced MDI 执行加工指令Advanced start 高级开始All axes 全部轴Auto 自动Auto mode parameter 自动参数Auxiliary functions 辅助功能BBackground 背景Bottom view 仰视图CCalibration 对刀Cancel 取消Center of circle 圆心坐标Center view 居中Change description 变换说明Clear view 清除画面Close 关闭Connection acceleration 设定弯道加速度Coordiate 坐标Copy 复制Current 实际值Current coordinate 当前工件坐标点Customize 属性Cut 剪切DDeepen 0.01mm 下降0.01毫米Delta 差值Depth 雕刻深度Disable mechanical limits 限位释放Draw the mechanical limit frame 显示行程范围EEdit 编辑Edit loaded file 编辑当前加工程序Editor 程序编辑End (mechanical) coor 终点(机械)坐标Enter simulation mode then start 进入仿真模式并开始仿真Execute 执行Exit 退出FFederate 进给速率File 文件File information 加工程序信息File name 文件名Find 查找Find the next 查找下一个Fit to window 调整至窗口大小Front view 正视图Full screen 全屏GG00 feedrate 空程速度HHeight 高度Help 帮助Horizontal 横铣how log window 显示系统日志窗口II/O state IO状态IDLE 空闲Import parameter 文件输入Inner 内框JJiggle 微调JOG 点动Jog feedrate 手动速度LLeft view 左视图Limit 限位Linear acceleration 单轴加速度List view 列表Load the saved workpiece origin 读取保存过的工件原点Log 系统日志MM.coor 机械坐标Machine 机床Machining 加工参数Machining feedrate 机器速度Machining range 加工范围Manager 程序管理Manual 手动Max 最大Maximum rpm of the spindle 主轴最高转速Midpoint 中点Midpoint X轴中点Min 最小Mirror axis 轴镜像Mobile calibrator 浮动对刀Mobile calibrator 对刀块Motion range 运动范围Motor parameter 电机参数Move to reference point 回机械原点Move to workpiece origin 回工件原点NNew 新建加工程序No information 没有加工文件信息Normal jog feedrate 手动低速Northeast 东北等轴侧视图Northwest view 西北等轴侧视图Note 注意OOK 确定Open and load 打开并编辑Operator 操作Order 序号Outer 外框PParameter 系统参数Paste 粘贴Pause 暂停Pin 引脚号PLU per mm PLT单位每毫米Pol.. 极性RRadius 圆弧半径Raise 0.01mm 上升0.01毫米Rapid jog feedrate 手动高速Ratio 显示比例Recent edited file 最近编辑的加工程序Recent loaded file 最近装载的加工程序Record X X轴记录Rectange frame mill 铣矩形边框Rectange mill 矩形铣底Remaine 剩余距离Repeat 替换Report view 详细资料Resume 断点继续Right view 右视图Round frame Mill 铣圆形边框Round mill 圆形铣底SSafe height 退刀点Save 保存Save and load 保存并装载Save as 另存为Save the current workpiece origin 保存当前工件原点Select all 全选Set work coordinate offset 设置运动坐标偏移Set workpiece coordinate 设置当前点工件坐标Set workpiece origin 设置当前点为工件原点Setting 设定值Setting directly 直接设置Show all point 显示所有输入输出点Show auto window 显示自动窗口Show current point 显示当前加工点Show editor window 显示程序编辑窗口Show file line number 显示加工程序序号Show file manager window 显示程序管理窗口Show I/O state window 显示IO状态窗口Show manual window 显示手动窗口Show parameter window 显示系统参数窗口Show this dialog-box while running 执行加工指令时仍显示本窗口Show trace window 显示加工轨迹窗口Simulate port 仿真输入点Single block 单段执行Southeast view 东南等轴侧视图Southwest 西南等轴侧视图Space 刀尖间距Spindle 主轴参数Spindle high rev 主轴高速Spindle low rev 主轴低速Spindle medial rev 主轴中速Start 开始Start (mechanical) coor 起点(机械)坐标"Start point(i.e. ,bottom-left corner)" 开始左边(即坐下角坐标)Start up/stop delay of the spindle 主轴启动(停止)时间Status bar 状态栏Stop 停止TTag 名称Thickness of the mobile calibrator 对刀块的厚度Tip of the day 每日提示Toggle polarity 反向该点极性Tool bar 工具栏Tool radius 刀具直径Top view 俯视图Total time 花费时间Trace 跟踪颜色Trace 加工轨迹Trace current line 跟踪加工程序当前行Turn on coolant 冷却开启Turn on spindle 主轴开启UUndo 撤消Unit: mm 单位:毫米Unload 卸载VVertical 纵铣View 查看WW.coor 工件坐标Width 宽度Windows 窗口Workbench 工作台行程ZZ axis Z轴Zoom in 缩小Zoom out 放大Zoom ratio 显示比例二、句子解释Clear view after opening a new file :打开新文件后自动清空跟踪视图Enable the default spindle rpm, and ignore the rm declare in the file:使用缺省转速放弃加工文件中指定的主轴转速,使用人为设置的系统缺省主轴转速Enable the default feedrate, and ignore declared in the file:使用缺省速度放弃加工文件中的指定速度,使用上面设置的系统缺省速度Enable the self-adaption optimization algorithm for the feedrate ,which will give better performance of machining effection:速度自适应优化允许系统根据加工文件的连接特性,对加工速度进行优化IJK increment mode, which means IJK values at a circle G code are incremental values from the center of the circle:IJK增量模式圆弧编程(G代码)中,圆心参数(IJK)为相对于起点的增量In order to avoid the position error caused by accidental cause, such as power off, emergency stop .please carry out this step to build or correct the mechanical coordinate after software starts up and an emergency stop occurred.:为了防止在加工过程中因以外情况,如断电,造成当前位置不准确,请在程序启动或者放生紧停之后重新执行机械原点Input displacement-per-pulse of each axis, which are the displacement between cutter and workbench wherever the motor receives a pulse:输入各个轴脉冲位移当量,即电机每发出一个脉冲,刀和工作台的相对位移Note :please restart after changing above parameters:注意:修改工作台行程需要重新启动程序Please input the password to open the manufactory parameter window:请输入口令以打开厂商参数窗口Push the left button, then all axes move to the reference point in order Z,X and Y axes:按左面按钮,则三个轴以Z,X,Y的次序全部回机械原点Please select one of the following three ways:请使用下列三种方法之一回机械原点Push the left buttons, then corresponding axis moves back to the mechanical reference points:按左列按钮,则对应轴回机械原点Reverse axis Z when import (plt or eng) file:当有文件输入(plt或eng)时Z轴反向Safe height is the Z-axis workpiece coordinate where tools does never touch workpieces accidentally:执行“回零”动作时,刀的上抬高度(相对于工件)Set the workbench dimensions, which decide when the system raises an out-of-limit alarm after the mechanical coordinate has become effective :设置工作台行程空间:如果机床运动超出此范围,则系统提示软限位报警(回机械原点后生效)Set the angle-per-pulse while Y axis is a revolving axis当Y轴是转轴时,设定脉冲角度当量The time is calculated at 100% federate, perhaps not equal to the actual value:以上时间信息均是按100%进给倍率计算出来的,所以,并不一定等于实际加工时间Tip :press TURBO(or CTRL) key jog more rapidly提示:按下高速键(或CTRL键)则高速点动Tip :this dialog-box is a model-less, it means the main window is still active:提示:现在请在手动窗口To perform a calibration action, Continue ?:执行对刀操作,继续?You can validate the mechanical coordinate directly if you confirm that you had done this step at the last start-up and *The machine is not powered off *No emergency stop occurred如果你肯定当前位置与机械坐标一致,请执行直接设定操作。

Autodesk Simulation DFM软件介绍说明书

Autodesk Simulation DFM软件介绍说明书

Simulate While You Design with Inventor and Simulation DFM Robert Savage – Advanced Solutions Inc., Education Specialist - Primary SpeakerKevin J. Smedley – FS-Elliott Co., LLC – Co-SpeakerMD5511 Simulation DFM or “Design for Manufacturing” software was created by Autodesk after they purchased Moldflow. It was inspired by a Moldflow software called “Moldflow Cad Doctor”, but DFM is not a Moldflow product… It is, however, powered by Moldflow. It was created to be used by designers and engineers to help verify the part design and cut down on costly mistakes at the part level. DFM loads inside your 3D design tool to give you near-real-time feedback on the quality of your plastic part, as you design it. Simulation DFM software reviews things, such as nominal wall thickness, draft angle, material cost, part recyclability, sink marks, fill patterns, and more, to grade your part in the categories of manufacturability, cost, and environmental impact. In this class, we will look at how we can analyze the part files, during the design process. We will also investigate the effect changes to the configurations and the parts have.Learning ObjectivesAt the end of this class, you will be able to:1. Learn how to navigate the Simulation DFM interface2. Learn how to analyze the model for possible defects3. Learn how to make changes to the model's material4. Review cost effects of part changesAbout the SpeakersRobert Savage is an Education Specialist at Advanced Solutions, Inc. He is a 15-year design veteran who has designed everything from molds and molded parts to robots. At Remotec, a division of Northrop Grumman Corporation, he spent 5 years as a designer in the development group, as well as CAD and Vault Administrator. He is an Autodesk Certified Instructor and a Certified Inventor Professional. He has used Inventor software since its inception, as well as being well-versed in a variety of other design software. He has 10 years of experience teaching 3D design software, including Product Design Suite Ultimate software, Factory Design Suite Ultimate software, Simulation Moldflow software, and Vault Professional software. Email: *****************************Kevin Smedley is currently Cad Manager for Product Engineering at FS-Elliott Company, a Global Centrifugal Compressor Manufacturer with facilities in Asia, Europe, South America and headquartered in Export, Pennsylvania. He has 26 years of Autodesk applications experience in design/drafting and as an Autodesk VAR channel Technical/Mechanical Applications Engineer. He spent 16 years, in the Autodesk channel, implementing 3D processes and creating Vault database strategies, along with training users. Kevin has created best practices and workflows, as a Certified Inventor and Vault Specialist. He’s presented lectures and hands-on labs at Autodesk University for 7 years, as wel l as attending AU for 10 years. Kevin’s philosophy is summed up in three words… Communication, Consistency, and Standards. Kevin continues pursuing best practices and processes for the Product Design Suite and Vault Pro data management. Email: ***********************ContentsLearning Objectives (1)About the Speakers (1)Chapter 1 (3)Navigate the Interfaces (3)Widget (4)Standalone (7)Chapter 2 (8)Analyzing the Model (8)Indicators (8)Pull Direction (11)Injection Locations (14)Animation Tools (11)Finished Part View (15)Saving and Exporting (17)Chapter 3 (18)Making Changes (18)Configure Rules (18)Materials (24)Chapter 4 (26)Cost Effect of Part Changes (26)Mold Cost (26)Material Cost (27)Production Cost (27)Chapter 1Navigate the Interfaces∙Widget∙StandaloneSimulation DFM (Simulation Design for Manufacturing) is part of the Autodesk Digital Prototyping solutions. Simulation DFM also runs as a standalone tool and as a widget inside your Autodesk Inventor software. In addition, it will work in PTC Creo, and Solidworks. Simulation DFM is designed to show real-time evaluation of your plastic components, focusing on Manufacturability, Cost Efficiency, and Plastic Material Impact. It is intended to be used during the 3D part design process by both designers and engineers to minimize errors and improve design efficiencies. The widget usesgreen/yellow/red indicators for visual feedback in areas,such as wall thickness, draft angles, sink marks, fillpatterns, and part recyclability. As the design processbuilds, the DFM evaluates and updates the output.Autodesk has a portfolio of Simulation products which fits into a number of different situations. The portfolio make up includes the following:Mechanical SimulationMoldflow SimulationComposite SimulationComputational Fluid Dynamics SimulationStructural AnalysisWidgetSimulation DFM will run as a widget inside Autodesk Inventor, as well as PTC Creo, and Solidworks, giving the same analysis for each of the products. The widget is similar to a toolbar, but instead of icons, it has indicators that change colors from Green to Yellow to Red, showing the severity of the issue. In this class, we are going to be focusing on using DFM, while running Inventor software. It can be set to load automatically in the software by going to the Tools Tab then selecting the Add-Ins Button. Inside the Add-In Manage, you can set Autodesk Simulation DFM to Load/Unload or Load Automatically.The Widget has 3 main parts: the Indicators, the Menu, and the Refresh Button. The Widget Indicator displays the results of the analysis in the 3 different categories: Manufacturability, Cost Efficiency, and Plastic Material Impact.The Widget Menu is a dropdown menu in the lower right hand corner of the page. In the drop down, you will find the options and toolbars for defining injector locations and Fill Animation, as well as A Finish Part Previewer. The Refresh tool, which can be set to automatically refresh, will show as a button in the upper left hand corner of the tools. The Refresh tool is what you would select to tell it to refresh your calculations.If an indicator has a yellow triangle with an exclamation mark on it, you have received an Alert. This means you have one or more subcategories with an issue, which you need to address. If you select on the indicator, it will display the subcategory with the issue. If you select the subcategory, it will then display the issue on the model.IndicatorsPlastic Material ImpactCost EfficiencyManufacturabilityMenuRefreshThe Refresh can be used as an Automatic Refresh by checking the option in the dropdown list on the widget, or used as a manual refresh to be selected as desired.ToolbarsThere are 2 toolbars available in the dropdown menu on the widget. They are named, “Injection location” and “Animation”. In the software, they display as toolbars. However, in the standalone they show up as tabs in the ribbon.Injection locationAnimation (Fill Animation)StandaloneSimulation DFM will not only run inside of a variety of design software, but it also runs as a standalone where it will read and analyze 11 different file formats. The standalone will run the same tools as the add-on software. In the standalone, you have the same tools as the widget, but you have an increase in file formats that you can work with.It also contains 2 different ways of using the tools. You can choose to use the widget or the ribbon to access the different tools.Chapter 2Analyzing the Model∙Indicatorso Manufacturabilityo Cost Efficiencyo Plastic Material Impact∙Pull Direction∙Fill Tools∙Injector Locations∙Finished Part Preview∙Exporting ResultsIn this Chapter, we are going to focus on how the tools are used to analyze your design. The tools are used the same, whether you are using the Widget or the Standalone tools. The Indicator tools will give you visual feedback on the thresholds that are configured in the system. The toolbars will allow you to set injector locations and view the fill results based on the injector locations.Indicatorso Manufacturabilityo Cost Efficiencyo Plastic Material ImpactManufacturability, Cost Efficiency, and Plastic Material Impact are indicators on the widget, but they are rollups of different subcategories. They indicate the overall effect of the different subcategories by using different colors. By selecting the indicator, it will list the subcategories that are not at optimal levels in the alerts section and all levels will be listed in the information section.There are 3 buttons in the Indicators. They each have different areas they are evaluating. The button changes colors from green to yellow to red, and if you put your cursor over the indicator it will give you an overall percentage of the cumulative subcategories. If you select the indicator, you will get a drop down that has two tabs: Alerts and Information. In the Alerts area, you will see any subcategory that has a higher chance of causing an issue in manufacturing. Selecting a subcategory will also highlight the areas on the screen where the issue exists.The Information tab will let you see the results from all of the sub categories. Selecting a subcategory will either giving you an on-the-screen representation of the issues, or a dialog box indicating why the rating is not high.In the design software, the Indicators and subcategories recalculate, as you make modifications to the model or when you tell it to refresh. Unless, you have it set to Auto-refresh.Animation ToolsThe Animation tool will play, pause, and replay the fill animation, based on the injector locations. This can be used with the Injector tools to see how the part will fill. These tools are used together to determine results, like, Weld Lines and Sink Marks.Pull DirectionThe Pull Direction is a tool that is only available in the standalone. The icon for the tool launches a tab on the ribbon, allowing you to define or move the pull direction of the part. It launches a triad that you can place and adjust, by making adjustments to the Red, Green or Blue circular rings.Injection LocationsThe Injection Locations tool will allow you to Move, Add and Delete Injector Locations. There is, by default, 1 injector placed by Simulation DFM that is used in several of the calculations. By moving or adding locations, it will prompt the software to redo the calculations and change the results.Finished Part ViewThe Finished Part View tool is located in the dropdown list on the Widget and the Ribbon on the standalone. It generates a rendered view of the part to help show any defects that may be caused by fill or weld line issues. Inside the rendered window, you can make adjustments to the material under the Edit drop down menu and highlight the defects under the view dropdown. You can also save the file out as an image file under the File dropdown.Saving and ExportingWhen you save the file in Inventor, any adjustments you make to the DFM portion of the file is saved, so that the next time you open the file the changes are still there. If you have the software, you can also export the information to the Autodesk MoldFlow.My Analysis ProcessIn this section, I want to go through the DFM Analysis process I use on plastic parts. Every part is different, as is every user. That is why this is intended as a general process guideline.1. Open or create the file to the point that you are ready to start analyzing it.2. Update or turn on automatic updates.3. Review manufacturability alerts and information.4. Check your fill location or locations.5. Make necessary changes to the part.6. Repeat 3 and 4 till you have it the way you want it.7. Review cost and material alerts and information to see if changes are needed.8. Run finish part preview.9. Save and export if needed.Chapter 3Making Changes∙Configure Rules∙MaterialsIn this section, we are going to look at the different areas you can configure to changes the results that DFM displays in the indicators. We are also going to see how to change materials and what affect the material changes have to the results.Configure RulesThe Configuration Rules can be accessed from the drop down menu on the widget or the ribbon in the standalone. In the rules configuration area, you can select what rules affect the indicators. In the sub categories, you can adjust the percentages displayed in the indicator.Note:∙Modifications to the configuration will apply to all parts∙Not all parameters can be configured∙Because an indicator result is a combination of several parameters, the effect of altering a parameter may not be obvious∙Realistic parameter values need to be appliedIn the rule configuration dialog box, you can adjust what calculations are included in the indicators by checking or unchecking the rule in the main indicator headers.Manufacturability: Wall Thickness calculates the percentage above and below the median wall thickness.Manufacturability: Undercuts calculate the percentage of undercuts to total surface.Manufacturability: Draft Angle calculates a percentage of drafted faces, based on a defined minimum draft angle.Manufacturability: Weld Lines will check weakness and visual flaws caused by joining flow.Manufacturability: Sink Mark checks for surface depressions.Manufacturability: Filling calculates fill ability, based on pressure location and wall thickness.Manufacturability: Knife Edge (New in the 2015 software version) allows you to define a minimum thin edge.Cost Efficiency: Mold Cost is based on size and complexity of the mold tooling.Cost Efficiency: Material Cost calculates raw material cost and volume.Cost Efficiency: Production Cost is based on cycle times.Plastic Material Impact: Carbon Footprint calculates the carbon dioxide required to produce each.Plastic Material Impact: Embodied Energy calculates the energy in BTU’s required to make each part.Plastic Material Impact: Recyclability calculates material recycle rate.Plastic Material Impact: Embodied Water calculates the water required to produce the part.If you have a threshold you want to meet, most of these allow you to add or append the percentages.You also have a button at the bottom of the page that will “Restore All Defaults”.MaterialsMaterial is changed differently in the standalone verses the widget in Inventor. In the widget (Inside Autodesk Inventor), the material is changed in the same way you would for any other part. You can change it using the physical tab, in the part iProperties, or the material drop down menu on the ribbon. Both of these options use the Autodesk Materials Library.In the standalone, you would use the Select Material tool on the Home tab of the ribbon. In the Material selection box, materials are listed by name, as well as by common uses. It also displays a cost indicator and plastic material impact indicator. You can sort the materials by Application and Attributes, using the drop down list at the top of the box.Chapter 4Cost Effect of Part Changes∙Mold Cost∙Material Cost∙Production CostIn this section, we are going to look at how cost effect is determined based on three main categories: Mold Cost, Material Cost, and Production Cost. There is no true way for the software to calculate the actual cost of the mold, the material, or the production of the part. What it does is display the Cost Efficiency as a percentage of the three categories. These calculations adjust with every effected change made to the part, both physical and material.Mold CostMold Cost checks the size and complexity of the mold tooling. As you make changes to the parts to reduce size and complexity, the system will automatically recalculate and adjust.Material CostThe Material Cost is based on part size and raw material cost. As you adjust the model size or material, whether it is in the CAD software or in the standalone application, it will adjust the calculations.Production CostProduction Cost is based on Part Cycle Time, which is based on material properties, injector quantities and fill pattern.ConclusionSimulate While You Design with Inventor and Simulation DFM ∙Learn how to navigate the Simulation DFM interface∙Learn how to analyze the model for possible defects∙Learn how to make changes to the model's material∙Review cost effects of part changesIn this class, we looked at using Simulation DFM inside of Inventor and as a standalone, to improve the design process of creating plastic parts. Simulation DFM is an analysis tool that allows you to see the effect different variables have on the overall manufacturability of a part. You can also see real-time updates on how changes to the file and material effect the overall manufacturability of the part.In Chapter 1, we went through the interface of both the widget that runs inside of Inventor, as well as the standalone interface. We also looked at the different areas in the interface and what they mean.In Chapter 2, we explored the different analysis tools that exist within the software and how to apply them to the model.In Chapter 3, we talked about the effect changes to the rules, as well as the material, have on the calculations.In Chapter 4, we looked at how the cost effect was calculated and how changes effect the results of the calculations.I want to thank you for attending this class. I know you have a lot of class choices at AU2015. If you have any questions on the information, please feel free to email me at*****************************.I would also like to thank Kevin Smedley for his assistance in this class. He not only kept me on track, but on point.。

ADS晶体管直流仿真教程

ADS晶体管直流仿真教程

ADS晶体管直流仿真教程2.This chapter introduces the mixer circuit and shows all the basics of DC simulations, including a family of curves and device biasing calculations.Lab 2: DC SimulationsLab 2: DC Simulations2-2OBJECTIVESBuild a symbolized sub-circuit for use in the hierarchy Create a family of curves for the device used in the mixer Sweep variables, pass parameters, and the plot or list the data ? Use equations to calculate bias resistor values from simulation dataNOTE about this lab: This lab and the remaining labs will use the BJT mixer to demonstrate all types of simulations. Regardless of the type of circuit you design, the techniques and simulations presented in these labs will be applicable to many other circuit configurations.PROCEDUREThe following steps are for creating the mixer BJT sub-circuit with package parasitics and performing the dc simulations as part of the design process.1. Create a New Project and name it: mixer2. Open a New Schematic Window and save it as: bjt_pkg3. Setup the BJT device and model:a. Insert the BJT generic device and model: In the schematic window,select the palette: Devices–BJT . Select the BJT-NPN device and insert it onto the schematic. Next insert the BJT Model (model card withdefault Gummel Poon parameters).Lab 2: DC Simulations2-3b. Double click on the model. When the dialog appears, click Component Options and in the next dialog, click Clear All and OK . This will remove the parameter list from the schematic.c. Assign Forward Beta = beta. Double click on the model card you just inserted. Select the Bf parameter and type in the word beta as shown here. Also, click the small box : Display parameter on schematic for Bf only and then click Apply . The numerical value of beta will be assigned in the next steps.d. Type in the value of Vaf (Forward Early Voltage) as 50 and display it by clicking Apply and OK . This will make the dc curves more realistic.e. Click OK to dismiss the dialog box with these changes.f. For the BJT device or any component, you can also remove theunwanted display parameters (Area, Region, Temp and Mode) by editingit in the same way.Lab 2: DC Simulations2-44. Build the rest of the subcircuitThe picture here shows the completed subcircuit. Follow the steps to build it or simply build it as shown:NOTE: Connect the components together or wire them as needed.a. Insert the package parasitics L and C: Insert three lead inductors (320pH ) and two junction capacitors (120 fF ). Be sure touse the correct units (pico and femto) or your circuit will not have the correct response.Also, add some resistance R= 0.01 ohms to the base lead inductor and display the desired component values as shown.b. Insert port connectors: Click the port connector icon (shown here) and insert the connectors exactly in this order : 1) collector, 2)base, 3) emitter. You must do this so that the connectors have the exact same pin configuration as the ADS BJT symbol. Edit the port names – change P1 to C, change P2 to B, and change P3 to E.c. Clean up the schematic: Position the components so the schematiclooks organized – this is good practice. To move component text, press the F5-Key and then select the component . Use the cursor to position the text.Add Wire icon.Lab 2: DC Simulations2-55. Create a symbol for the sub-circuitThere are three ways to create a symbol for a circuit: 1) Use a default symbol, 2) Use a built-in symbol (a standard symbol), or 3) Create a new symbol by drawing one or modifying an existing one. For this lab you will use a built-in bjt symbol which looks better than the default three-port symbol. The following steps shows how to do this:a. To see the default symbol, click : View >Create/Edit Schematic Symbol . The symbol page will replace the schematic page and a dialog will appear. Click OK to use the defaults.b. Next, a rectangle or square with three ports is generated:NOTE : You will be replacing the default symbol with a built-in BJT symbol in the next steps. As you do, you must assign the pin (port) numbers exactly as shown to match the built-in symbol for the emitter, base, and collector.c. To change the symbol to a built-in symbol that looks like atransistor, delete the entire symbol you just created: Select > Select All . Then click the trash can icon to delete the symbol.d. Return to the schematic: View > Create/Edit Schematic .Now click File> Design Parameters . In the General tab,there is a Symbol Name parameter list. Click the arrow and select: SYM_BJT_NPN . Also, Change the component instance name to Q.Lab 2: DC Simulations2-6e. Set beta as a pass parameter: To do this, click the Parameters tab. In the Parameter Name area, type in beta and assign a default value of 100by clicking the Add button. Be sure to click the Display button as shown in the picture. Click the OK button at the bottom (not shown here) to save the new definitions and dismiss the dialog.f. In the schematic window, Save the design to make sure all your work is save and close the window . You now have a sub-circuit that will be available for use in other designs and other projects.6. Create another circuit for DC simulationsa. Open a new schematic from the Main window and save it as: dc_curves .This will be the upper level circuit.b. Click on the Library list icon and the library browser will appear.Select the mixe r project and you will see the bjt_pkg circuit listedas an available component.Lab 2: DC Simulations2-7c. Select the bjt_pkg component and the npn transistor symbol will be appear on your cursor. Click in the dc_curves schematic to insert the bjt_pkg . You can now close the library window and save the dc_curves design (good practice to save often).7. Set up a dc curve tracerFor this step you will use a template. ADS built-in templates make it easier to set up the simulation after the schematic is built. In this case, the dc curve tracer template is set up to sweep VCE within incremental values of base current IBB.a. On the schematic, click File > Insert Template and select the BJT_curve_tracer to insert it. Click OK and it will appear on yourcursor - to insert it, click near your bjt_pkg symbol.Click to insert the template.Lab 2: DC Simulations2-8b. With the curve tracer template inserted, wire the circuit together so it looks like the shown here. Note that you can move the component text using the F5 key so that the schematic looks good.NOTE: If you did not use this Template, you would have to insert every component (the V_DC source, the I_Probe, the I_DC source, etc.) one at a time. Also, you would have to assign and set up the variables (IBB, VCE) for the swept simulation.c. Set the Parameter Sweep IBB values: 1 uA to 11 uA in 2 uA steps .Parameter Sweep components are available in all simulation palettes. Set the DC simulation controller SweepVar VCE : 0 to 5 in 0.1 steps .Notice that the VAR1 variables VCE and IBB can be used as is becausethey only initialize the variables but it is best to use reasonable values.F5Wire IconKeyboard F5 is a Hot Key for movingcomponent textLab 2: DC Simulations2-98. Name the dataset and run the simulation a. Click Simulate > Simulation Setup . When the dialog appears,type in a name for the dataset dc_curves as shown.b. Click Apply and Simulate .c. After the simulation is finished, click the Cancel button and the setup dialog will disappear. If you get an error message, check the simulation set up and repeat if necessary.9. Display the results, change beta, and resimulate a. Click the New Data Display icon (shown here). Insert a rectangular plot and add the IC.i data . Note that voltage VCE is the default X-axis value. The results should look similar to the “beta=100”plot shown here.b. On the schematic, change the value of beta = 144. The value will automatically be passed down to the sub circuit that you set up in the previous steps. Simulate again and notice the change as shown here.NOTE: You will use beta =144 for the remainder of the labs.Lab 2: DC Simulations2-10c. Insert a marker on the dc_curves trace (as shown here), where the initialspecification of 1 mA at VCE corresponds to about 7 uA of base current.d. Insert a list (click the icon).e. Select collector current IC and add it . If the list is in table format as shown (box with Xacross it), edit or double click the list and check the box, Suppress Table Formatand OK. Then scroll through the data.List IconLab 2: DC Simulations2-11DC Bias DESIGN CONSIDERATION: When the final circuit is constructed, the LO drive will shift the current slightly higher and this means that the operating point can be a little lower if desired. In addition, a current limiting collector resistor RC will be required and that will lower the voltage across VCE. Knowing this, it is reasonable to assume that VCC of 2 volts will be divided with a voltage drop of about 0.5V for RC with the remaining 1.5V across the device VCE.10. Create a new design to calculate bias valuesThe next steps will sweep only base current for a fixed value of VCE at 1.5 volts. This will allow you to determine values of base-emitter voltage VBE that can be used to calculate the bias resistor values.a. Save the dc_curves schematic . Next, save it with a new name as follows: click File > Save As and when the dialog box appears, type in a new name: dc_bias . Now, you have three designs in the networks directory: bjt_pkg, dc_curves anddc_bias.b. If only one variable is swept, it is more effective to sweep it in theSimulation controller and not in a Parameter sweep. Therefore, delete the Parameter Sweep . Refer to the schematic here to: 1) edit the DC controller to sweep IBB: 1uA to 11 uA in 1 uA steps , 2) set Vdc =1.5V , and 3) remove VCE from the VarEqn by editing it (double click)and using the Cut button to remove VCE as a variable.c. Insert a node name to allow you to get simulation data from a node on the schematic. Click the icon or use the command: Component >Name Node . When the dialog appears, type in the name VBE and clickon the node at the base of the transistor.VCE is cut from theDC controller,Lab 2: DC Simulations2-12d. Save and Simulate : Save the new design by clicking the save icon –this is always good practice. Next, check the dataset name: Simulation > Setup ) as in the previous simulation. Be sure it appears as: dc_bias and then Simulate .11. Display the data (dc_bias) in a listIn this step, you will use the same data display window that contains the dc_curves data. In fact, you can plot numerous datasets in the display but you must explicitly define (dataset name..) the data to be displayed.a. In the current Data Display window, notice that the default dataset is dc_curves. This is OK. However, if you change the default todc_bias , you will see that the plot becomes invalid because the data is not the same array size as the two dimensional one. This is normal. Try this now as shown and then set it back to dc_curves .b. Now, in the current Data Display window, make room for the new data by using the zoom and view icons . Then insert a new list .c. When the list dialog box appears, select thedc_bias dataset and, add VBE and IC . You should get results similar to those here where IC is veryclose to 1 mA.Lab 2: DC Simulations2-13d. Draw a box around the values of interest as shown here. To do this,click the rectangle icon from the tool bar and draw it on the list. This is one way to highlight the data. Also, the data display window by using Save As and giving it a name like: dc_data.12. W rite an equation to calculate Rb a. On the data display,insert an equation by clicking on the equation icon and then clicking in the data display window:b. When the dialog appears, type in the equation as shown by typing and using the Insert button. First, select the dc_bias dataset in the upper right (circled). To write the equation type the first part only: Rb = (1.5 -and select VBE and click < help.Lab 2: DC Simulations2-14IMPORTANT NOTES on writing equationsEquations that operate on data can either be explicit or generic:The difference in these two equations is in the data being referenced, especially the default dataset in the case of the generic equation. Also, note that equations and data are CASE SENSITIVE.c. Verify how the generic equation described above will work. Be sure the data display shows dc_curves as the default dataset . Now, insert another equation and type it in as shown (generic version):Rb1 = (1.5 - VBE) / IBB . After you click OK and it will be red (invalid)d. Now, change the default dataset to dc_bias (at the top of the display) and verify that it is valid.Now, continue with the design by calculating the collector resistor.e. Write an equation for resistor Rc . You should be able to do this based on what you learned in the previous steps.Generic Equation: When no equation applies to the default dataset.Explicit Equation: Areferenced: name..Lab 2: DC Simulations2-15f. List the values Rb and Rc .Insert a List and when the first dialog appears, select Equations by clicking the arrow. Then Add Rb and Rc and click OK .g. When the list appears, you will then see a table of values for Rb and Rc that correspond to the value of IBB. As a rule, you always get the independent variable (here IBB) when you list or plot data.h. Increase the size of a display (if you see dots …after the entries), by dragging the corner of the list. If dots appear after a number or name, it indicates there is more data and you should increase the size of the list or plot.i. Draw a box (rectangle around the desired values to read it easier. Then edit the list (double click) and select Plot Options . Now, type in a title and change the format as shown by using the More button if desired.j. Be sure to save the display (.dds file). With these values of Rb and Rc,the next step is to bias the device and test the bias network.Lab 2: DC Simulations2-1613. Set up a new design to test the bias networkFor this step, you will create the schematic design without using a template. During this process you will learn some efficient ways to do this.a. Open a new schematic from the existing one, using the File > Newcommand or the icon and name it: dc_net . Notice that this dialog allows you to name the new design and gives you other options.b. In the new schematic (dc_net), insert your sub circuit bjt_pkg by typing in the name in the component history list:c. Set the value of beta to: 144d. Goto LumpedComponents palette and insert a resistor as the base resistor. Notice that “R” appears in the historylist when you do this.Lab 2: DC Simulations2-17e. Insert the collector resistor and rotate it: put the cursor in the history list “R” and press Enter. Immediately, when the resistor is attached to your cursor, click the –90 rotate icon shown here and the component will increment 90 degrees – then insert it.f. Insert a current probe (I_Probe) from the palette or type it in.Connect it to the top of the collector resistor.After you connect the component, you can drag it and it isautomatically wired.Lab 2: DC Simulations2-18g. Finish building the circuit as follows :Rename and assign resistors: Rb = 100 K ohms and Rc = 470 ohms . Rename the I_Probe: ICInsert V_DC supply set at 2 V from (Sources-Frequency Domain palette). Insert a node name at the collector as VC . Wire the circuit and organize it.NOTE on Name Node : To remove a named node , click Edit > Component >Remove Node Name or you can rename the node with a blank (click the icon and try it). This step is to show how to remove a node name – you may need it later on .h. Insert a DC simulation controller(Simulation-DC palette).Lab 2: DC Simulations2-1914. Simulate and verify the bias network conditionsFor this you do not need to display the data. Instead, you will simply annotate the schematic to verify that IC meets the 1 mA specification and that bias design consideration (described earlier) is accurate.a. Press the F7 keyboard key and the simulation will be launched with the dataset name that is the same as the schematic –this is the default. You can verify this by reading the status window:b. Annotate the current and voltage at the nodes. Click on the menu command: Simulate > Annotate DC Solution . Now you should see the voltage and currents at the nodes. Be sure that you have about 1 mAof collector current with VCE about 1.5 V. If not, check your work.VCE is 1.5 voltsIC is 1 mA。

Cadence学习笔记

Cadence学习笔记

.LOG17:34 2016/10/18pcb editor制作热风焊盘,Flash symbol,f内径-外径-开口inner diameter与regular pad 相同,outer diameter与anti pad 相同Thermal Relief 与Regular Pad 尺寸相同Anti Pad 比begin layer大40milpastemask = begin layer;soldermask = antipadspoke width(开口)=rugular pad的一半add->flash10:43 2016/10/19焊盘按其作用分为正规焊盘(Regular Pad)在正片中看到的焊盘,也是通孔焊盘的基本焊盘;隔热焊盘(Thermal Relief)应该把它译为防散热结构片,其作用就是为防止内电层覆铜与镀锡的钻孔完全接通。

因为这样将造成焊接时热量散失过快,焊接温度不够影响焊接;隔离焊盘(Anti Pad),也是在负片中有效,用于在负片中焊盘与敷铜的隔离。

一般用在电源层和地层内孔直径(mm):0.4 0.5 0.6 0.8 1.0 1.2 1.6 2.0焊盘直径(mm): 1.5 1.5 2.0 2.0 2.5 3.0 3.5 4.0对于超出上表范围的焊盘直径可用下列公式选取:直径小于0.4mm的孔:D/d=0.5~3直径大于2mm的孔:D/d=1.5~2式中:(D-焊盘直径,d-内孔直径)ENDLAYER层焊盘尺寸:同上。

DEFAULTINTERNAL层焊盘尺寸:DRILL_SIZE (钻孔尺寸)>= 实际管脚尺寸+ 10MIL(0.25mm)RegularPad >= DRILL_SIZE + 16MIL(0.4mm)(DRILL_SIZE<50MIL(1.27mm)) Regular Pad >= DRILL_SIZE + 30MIL(0.76mm)(DRILL_SIZE>=50MIL(1.27mm)) Regular Pad >= DRILL_SIZE + 40MIL(1mm)(钻孔为矩形或椭圆形时) Thermal Pad = TRaXbXc-d (其中TRaXbXc-d 为Flash 的名称(后面有介绍))Anti Pad = DRILL_SIZE + 30MIL(0.76mm)Flash Name: TRaXbXc-d其中:a. Inner Diameter(内径): Drill Size + 16MIL(0.4mm)b. Outer Diameter(外径): Drill Size + 30MIL(0.76mm)c. Spoke width:12 ( 当DRILL_SIZE = 10MIL 以下)15 (当DRILL_SIZE = 11~40MIL)20 (当DRILL_SIZE = 41~70MIL)30 (当DRILL_SIZE = 71~170 MIL)40 (当DRILL_SIZE = 171 MIL 以上)保证连接处的宽度不小于10mil 。

Multisim、Protel、Keil和Proteus的区别

Multisim、Protel、Keil和Proteus的区别

Multisim.protel.keil c和proteus的区别-- Multisim.protel.keil c和proteus的区别Multisim.protel.keil c和proteus都有电路仿真功能,但它们都有哪些区别呢,寻求高手帮忙。

是不是可以说keil c是通过程序仿真而proteus是通过电路图仿真呢???还有Multisim到底有哪些功能???现在这几种软件哪些比较重要,哪些需要掌握呢???????最佳答案Multisim有超强板级的模拟/数字电路板的设计工作。

它包含了电路原理图的图形输入、电路硬件描述语言输入方式,具有丰富的仿真分析能力。

高版本可以进行单片机等MCU的仿真。

Multisim有实际元器件和虚拟元器件,它们之间根本差别在于:一种是与实际元器件的型号、参数值以及封装都相对应的元器件,在设计中选用此类器件,不仅可以使设计仿真与实际情况有良好的对应性,还可以直接将设计导出到Ultiboard中进行PCB的设计;虚拟元器件只能用于电路的仿真。

Protel的高版本Altium Designer,是业界第一款也是唯一一种完整的板级设计解决方案。

是业界首例将设计流程、集成化PCB 设计、可编程器件(如FPGA)设计和基于处理器设计的嵌入式软件开发功能整合在一起的产品,一种同时进行PCB和FPGA设计以及嵌入式设计的解决方案,具有将设计方案从概念转变为最终成品所需的全部功能。

主要用途:原理图输入设计PCB板。

Keil C51是美国Keil Software公司出品的51系列兼容单片机既可以汇编开发也可以C语言软件开发的系统。

Proteus具有模拟电路仿真、数字电路仿真、单片机及其外围电路组成的系统的仿真、RS一232动态仿真。

①C调试器、SPI调试器、键盘和LCD系统仿真的功能;有各种虚拟仪器,如示波器、逻辑分析仪、信号发生器等。

③目前支持的单片机类型有:68000系列、8051系列、A VR系列、PIC12系列、PIC16系列、PIC18系列、Z80系列、HC11系列以及各种外围芯片。

DELMIA机器人仿真教程

DELMIA机器人仿真教程

Position and Manipulate Compass Insert Products and Resources Snap and Attach
Create Tags Create Robot Tasks Use Teach and Jog Run a Robot Process Create Robot Task and Add Weld Gun Action
Using Manipulation Bounding Boxes Snapping Automatically to Selected Object Editing Positions
Factory Layout and Robotics / Device Task Definition
鼠标放置在罗 盘上,按住鼠 标左键不放拖 动罗盘到指定 的物体表面
机器人自由度限制颜色显示,当机器人运动超过了限制就会现实出对应的颜色
模拟路径显示设置
E
Digital Process for Manufacturing Settings
Tree Hierarchy Tree Fastener Process Planner Commands Fastener Visualization Showing the Fasteners
选上Tree/Hierarchy tree下面所 有的复选框
显示焊点
F
Options
Resource Detailing Settings
Robotic Task Display Options Update all Tasks Icon Teach Dialog Setting Offline Programming
Parameters and Measures Settings

Simlink仿真环境第四章

Simlink仿真环境第四章
21
4.5.4 实例观察S函数文件和模型
• 打开stest1.m文件 • 打开stest1_090508.mdl
4.5.5 数学方程形式仿真单摆运动
• 打开stest_090508_math.mdl文件 • 比较仿真结果
4.6 模块化与封装
模块化技术可以简化系统结构,提高集成化程度 把模块的集体内容包装起来,对外只显示关键数 据,可供用户修改
编制带死区M文件并起名deadzone.m → save as
打开仿真图形test2,打开Simulink→打开UserDefind Functions→拖入MATLAB Fcn 双击MATLAB Function图标,打开参数设定界面 在MATLAB Function中键入M文件名 修改MATLAB Function图标下的名称 连接到仿真图中
给各模块输入合适的值 连接各模块,运行调试 用1.2所示创建模块(lianxuxitong.mdl)
29
例4-3:变换上例的模型
将x’(t) = -2x(t) + u(t)两侧同时进行拉氏变换,得
X(s)S = -2X(s) + U(s)
X(s)S + 2X(s) = U(s)
8、选择示波器
在Simulink模型库的Sinks中→拖动Scop示波器 到仿真图中
9、构建闭环系统
用直线连接各个环节,构成闭环控制系统,注 意箭头的方向
12
例:PID调节过程仿真(续)
10、修改仿真参数
在仿真图形界面,选择Simulation菜单中的Simulation parameters…,显示参数设定对话框 在Solver中修改参数 设定start time和Stop time(设 0、20) 在解题选项(Solver options)中选择“Variabiestep变步长”和“ode45”算法

androiddialog筛选列表

androiddialog筛选列表

androiddialog筛选列表1.效果图2. 布局⽂件1)显⽰筛选的标题<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"android:layout_margin="@dimen/outer_border_width"><RelativeLayoutandroid:id="@+id/titlebar"android:layout_width="match_parent"android:layout_height="@dimen/titlebar_height"android:background="@color/vi_color"><ImageViewandroid:id="@+id/arrowLeftImg"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginLeft="5dp"android:layout_centerVertical="true"android:clickable="true"android:focusable="true"android:src="@drawable/icon_arrow_left_white"/><TextViewandroid:id="@+id/title"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerHorizontal="true"android:layout_centerInParent="true"android:layout_centerVertical="true"android:text="筛选"android:textColor="@color/White"android:textSize="@dimen/titlebar_title_text_size"/><TextViewandroid:id="@+id/tvOk"android:layout_width="wrap_content"android:layout_height="match_parent"android:layout_alignParentRight="true"android:layout_centerVertical="true"android:background="@drawable/sel_titlebar_menu_bg"android:clickable="true"android:focusable="true"android:focusableInTouchMode="true"android:gravity="center"android:paddingLeft="@dimen/titlebar_menu_padding"android:paddingRight="@dimen/titlebar_menu_padding"android:text="@string/ok"android:textColor="@drawable/sel_titlebar_menu_color"android:textSize="@dimen/titlebar_menu_text_size"/></RelativeLayout><Viewandroid:layout_width="match_parent"android:layout_height="@dimen/divider_line_width"android:background="@color/divider_line_color"/><ListViewandroid:id="@+id/lvFilterTitles"android:layout_width="match_parent"android:layout_height="wrap_content"android:divider="@null"android:layoutAnimation="@anim/layout_anim_controller"/></LinearLayout>2)dialog⾥的列表<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="/apk/res/android"android:layout_width="fill_parent"android:layout_height="wrap_content"android:background="@color/White"android:gravity="center"android:orientation="vertical"><LinearLayout xmlns:android="/apk/res/android"android:layout_width="fill_parent"android:layout_height="50dp"android:background="@color/White"android:gravity="center"android:weightSum="2"android:orientation="horizontal"><TextViewandroid:id = "@+id/tvDialogTitle"android:layout_width="wrap_content"android:layout_height="wrap_content"android:gravity="center"android:layout_weight="1"android:textSize="@dimen/title_2_text_size"/><Viewandroid:layout_width="2px"android:layout_height="match_parent"android:layout_marginTop="0dp"android:background="@color/divider_line_color"/><TextViewandroid:id = "@+id/tvOk"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="@string/ok"android:gravity="center"android:textColor="@color/vi_color"android:layout_weight="1"android:textSize="@dimen/title_2_text_size"/></LinearLayout><Viewandroid:layout_width="match_parent"android:layout_height="@dimen/divider_line_width"android:layout_marginTop="0dp"android:background="@color/divider_line_color"/>"<ListViewandroid:id="@+id/lvFilter"android:layout_width="fill_parent"android:layout_height="250dp"android:layout_gravity="center"android:cacheColorHint="#00000000"></ListView></LinearLayout>3. java 代码实现⽐较关键的部分已标⾊,觉得有⽤的可以⾃⼰研究下,改改就可以直接⽤了. public class FilterActivity extends Activity implements OnClickListener {private static final String TAG = "FilterActivity";public static final String FILTER_STRING = "filter_string";public static final int FILTER_RESULT_CODE = 99;private AlertDialog builder;private ListView dialogLv;private TextView mTvCity;private TextView mTvDialogTitle;private Context mContext;private ListView mLvFilterTitles;private int mFilterItemIndex = -1;private ArrayList<FilterItem> mFilterItems = new ArrayList<FilterItem>();private ArrayList<String> mHospitalNames = null;private ArrayList<Hospital> mHospitalList = null;private FilterTitleAdapter adapter;private FilterTitleAdapter filterTitleAdapter;private TextView mTvOk;private ImageView mIvBack;private String mFilterString;private HashMap<String, String> mFilterKeyMap = new HashMap<String,String>();@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(yout.activity_filter);mContext = this;initFilterKeyMap();mLvFilterTitles = (ListView)findViewById(R.id.lvFilterTitles);mTvOk = (TextView)findViewById(Ok);mIvBack = (ImageView)findViewById(R.id.arrowLeftImg);mTvOk.setOnClickListener(this);mIvBack.setOnClickListener(this);filterTitleAdapter = new FilterTitleAdapter();mLvFilterTitles.setAdapter(filterTitleAdapter);mLvFilterTitles.setOnItemClickListener(new OnItemClickListener(){@Overridepublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {mFilterItemIndex = position; //标记位置以便返回选中值buildDialog();}});}private void buildDialog() {builder = new AlertDialog.Builder(this).create();builder.show();LayoutInflater inflater = LayoutInflater.from(this);final View viewDialog = inflater.inflate(yout.dialog_filter, null);mTvDialogTitle = (TextView)viewDialog.findViewById(DialogTitle);builder.setContentView(viewDialog);builder.getWindow().setGravity(Gravity.BOTTOM);dialogLv = (ListView) viewDialog.findViewById(R.id.lvFilter);TextView dialogOk = (TextView) viewDialog.findViewById(Ok);dialogOk.setOnClickListener(new OnClickListener(){@Overridepublic void onClick(View arg0) {builder.dismiss();}});String titleName = mFilterItems.get(mFilterItemIndex).name;String titleEName = mFilterItems.get(mFilterItemIndex).eName;mTvDialogTitle.setText(titleName);// 这个listview的⽤法没啥好说的,在这⽤的是android⾃带的适配模式dialogLv.setAdapter(new ArrayAdapter<String>(mContext, yout.simple_list_item_1, getDialogLvData(titleEName))); dialogLv.setOnItemClickListener(new OnItemClickListener(){@Overridepublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {TextView tv = (TextView)viewDialog.findViewById(view.getId());tv = (TextView)view.findViewById(android.R.id.text1);Toast.makeText(mContext, "点了 "+ position+ " "+tv.getText(), 0).show();//这⾥在点击后,更新上⼀层listview⾥的数据,这样就达到同步的效果了mFilterItems.get(mFilterItemIndex).content = (String) tv.getText();filterTitleAdapter.notifyDataSetChanged();}});}private void initFilterKeyMap(){mFilterKeyMap.put("city", "城市");mFilterKeyMap.put("sex", "性别");mFilterKeyMap.put("star_level", "星级");mFilterKeyMap.put("age", "年龄");mFilterKeyMap.put("hospital", "医院");}private List<String> getDialogLvData(String key){List<String> data = new ArrayList<String>();switch (key){case "city":data.add("深圳");break;case "sex":data.add("男");data.add("⼥");break;case "star_level":data.add("1");data.add("2");data.add("3");data.add("4");data.add("5");break;case "age":data.add("20 - 29");data.add("30 - 39");break;case "hospital":break;}return data;}private class FilterTitleAdapter extends BaseAdapter {public FilterTitleAdapter() {super();for(Map.Entry<String, String> entry : mFilterKeyMap.entrySet()){FilterItem item = new FilterItem(); = entry.getValue();item.eName = entry.getKey();mFilterItems.add(item) ;}}@Overridepublic int getCount() {return mFilterItems.size();}@Overridepublic FilterItem getItem(int position) {return mFilterItems.get(position);}@Overridepublic long getItemId(int position) {return position;}@Overridepublic View getView(int position, View convertView, ViewGroup parent) {ViewHolder holder;if (convertView == null){holder = new ViewHolder();convertView = View.inflate(mContext, yout.list_item_filter_title, null);holder.mTvFilterName = (TextView) convertView.findViewById(R.id.filterItemText);holder.mTvFilterContent = (TextView) convertView.findViewById(R.id.filterItemContent); convertView.setTag(holder);} else {holder = (ViewHolder) convertView.getTag();}FilterItem fi = mFilterItems.get(position);holder.mTvFilterName.setText();holder.mTvFilterContent.setText(fi.content);return convertView;}}private class ViewHolder {TextView mTvFilterContent;TextView mTvFilterName;}@Overridepublic void onClick(View v) {switch (v.getId()) {case R.id.arrowLeftImg:this.onBackPressed();break;case Ok: //返回上⼀界⾯并传回数据getFilterString();Intent i;i = this.getIntent();i.putExtra(FILTER_STRING, mFilterString);this.setResult(FILTER_RESULT_CODE, i); finish();break;default:break;}}}。

ADS晶体管直流仿真教程

ADS晶体管直流仿真教程

2.This chapter introduces the mixer circuit and shows all the basics of DC simulations, including a family of curves and device biasing calculations.Lab 2: DC SimulationsLab 2: DC Simulations2-2OBJECTIVES• Build a symbolized sub-circuit for use in the hierarchy • Create a family of curves for the device used in the mixer • Sweep variables, pass parameters, and the plot or list the data • Use equations to calculate bias resistor values from simulation dataNOTE about this lab: This lab and the remaining labs will use the BJT mixer to demonstrate all types of simulations. Regardless of the type of circuit you design, the techniques and simulations presented in these labs will be applicable to many other circuit configurations.PROCEDUREThe following steps are for creating the mixer BJT sub-circuit with package parasitics and performing the dc simulations as part of the design process.1. Create a New Project and name it: mixer2. Open a New Schematic Window and save it as: bjt_pkg3. Setup the BJT device and model:a. Insert the BJT generic device and model: In the schematic window,select the palette: Devices–BJT . Select the BJT-NPN device and insert it onto the schematic. Next insert the BJT Model (model card withdefault Gummel Poon parameters).Lab 2: DC Simulations2-3b. Double click on the model. When the dialog appears, click Component Options and in the next dialog, click Clear All and OK . This will remove the parameter list from the schematic.c. Assign Forward Beta = beta. Double click on the model card you just inserted. Select the Bf parameter and type in the word beta as shown here. Also, click the small box : Display parameter on schematic for Bf only and then click Apply . The numerical value of beta will be assigned in the next steps.d. Type in the value of Vaf (Forward Early Voltage) as 50 and display it by clicking Apply and OK . This will make the dc curves more realistic.e. Click OK to dismiss the dialog box with these changes.f. For the BJT device or any component, you can also remove theunwanted display parameters (Area, Region, Temp and Mode) by editingit in the same way.Lab 2: DC Simulations2-44. Build the rest of the subcircuitThe picture here shows the completed subcircuit. Follow the steps to build it or simply build it as shown:NOTE: Connect the components together or wire them as needed.a. Insert the package parasitics L and C: Insert three lead inductors (320pH ) and two junction capacitors (120 fF ). Be sure to use the correct units (pico and femto) or your circuit will not have the correct response.Also, add some resistance R= 0.01 ohms to the base lead inductor and display the desired component values as shown.b. Insert port connectors: Click the port connector icon (shown here) and insert the connectors exactly in this order : 1) collector, 2)base, 3) emitter. You must do this so that the connectors have the exact same pin configuration as the ADS BJT symbol. Edit the port names – change P1 to C, change P2 to B, and change P3 to E.c. Clean up the schematic: Position the components so the schematiclooks organized – this is good practice. To move component text, press the F5-Key and then select the component . Use the cursor to position the text.Add Wire icon.Lab 2: DC Simulations2-55. Create a symbol for the sub-circuitThere are three ways to create a symbol for a circuit: 1) Use a default symbol, 2) Use a built-in symbol (a standard symbol), or 3) Create a new symbol by drawing one or modifying an existing one. For this lab you will use a built-in bjt symbol which looks better than the default three-port symbol. The following steps shows how to do this:a. To see the default symbol, click : View >Create/Edit Schematic Symbol . The symbol page will replace the schematic page and a dialog will appear. Click OK to use the defaults.b. Next, a rectangle or square with three ports is generated:NOTE : You will be replacing the default symbol with a built-in BJT symbol in the next steps. As you do, you must assign the pin (port) numbers exactly as shown to match the built-in symbol for the emitter, base, and collector.c. To change the symbol to a built-in symbol that looks like atransistor, delete the entire symbol you just created: Select > Select All . Then click the trash can icon to delete the symbol.d. Return to the schematic: View > Create/Edit Schematic .Now click File> Design Parameters . In the General tab,there is a Symbol Name parameter list. Click the arrow and select: SYM_BJT_NPN . Also, Change the component instance name to Q.Lab 2: DC Simulations2-6e. Set beta as a pass parameter: To do this, click the Parameters tab. In the Parameter Name area, type in beta and assign a default value of 100by clicking the Add button. Be sure to click the Display button as shown in the picture. Click the OK button at the bottom (not shown here) to save the new definitions and dismiss the dialog.f. In the schematic window, Save the design to make sure all your work is save and close the window . You now have a sub-circuit that will be available for use in other designs and other projects.6. Create another circuit for DC simulationsa. Open a new schematic from the Main window and save it as: dc_curves .This will be the upper level circuit.b. Click on the Library list icon and the library browser will appear.Select the mixe r project and you will see the bjt_pkg circuit listedas an available component.Lab 2: DC Simulations2-7c. Select the bjt_pkg component and the npn transistor symbol will be appear on your cursor. Click in the dc_curves schematic to insert the bjt_pkg . You can now close the library window and save the dc_curves design (good practice to save often).7. Set up a dc curve tracerFor this step you will use a template. ADS built-in templates make it easier to set up the simulation after the schematic is built. In this case, the dc curve tracer template is set up to sweep VCE within incremental values of base current IBB.a. On the schematic, click File > Insert Template and select the BJT_curve_tracer to insert it. Click OK and it will appear on yourcursor - to insert it, click near your bjt_pkg symbol.Click to insert the template.Lab 2: DC Simulations2-8b. With the curve tracer template inserted, wire the circuit together so it looks like the shown here. Note that you can move the component text using the F5 key so that the schematic looks good.NOTE: If you did not use this Template, you would have to insert every component (the V_DC source, the I_Probe, the I_DC source, etc.) one at a time. Also, you would have to assign and set up the variables (IBB, VCE) for the swept simulation.c. Set the Parameter Sweep IBB values: 1 uA to 11 uA in 2 uA steps .Parameter Sweep components are available in all simulation palettes. Set the DC simulation controller SweepVar VCE : 0 to 5 in 0.1 steps .Notice that the VAR1 variables VCE and IBB can be used as is becausethey only initialize the variables but it is best to use reasonable values.F5Wire IconKeyboard F5 is a Hot Key for movingcomponent textLab 2: DC Simulations2-98. Name the dataset and run the simulation a. Click Simulate > Simulation Setup . When the dialog appears,type in a name for the dataset dc_curves as shown.b. Click Apply and Simulate .c. After the simulation is finished, click the Cancel button and the setup dialog will disappear. If you get an error message, check the simulation set up and repeat if necessary.9. Display the results, change beta, and resimulate a. Click the New Data Display icon (shown here). Insert a rectangular plot and add the IC.i data . Note that voltage VCE is the default X-axis value. The results should look similar to the “beta=100” plot shown here.b. On the schematic, change the value of beta = 144. The value will automatically be passed down to the sub circuit that you set up in the previous steps. Simulate again and notice the change as shown here.NOTE: You will use beta =144 for the remainder of the labs.Lab 2: DC Simulations2-10c. Insert a marker on the dc_curves trace (as shown here), where the initialspecification of 1 mA at VCE corresponds to about 7 uA of base current.d. Insert a list (click the icon).e. Select collector current IC and add it . If the list is in table format as shown (box with Xacross it), edit or double click the list and check the box, Suppress Table Formatand OK. Then scroll through the data.List IconDC Bias DESIGN CONSIDERATION: When the final circuit is constructed, the LO drive will shift the current slightly higher and this means that the operating point can be a little lower if desired. In addition, a current limiting collector resistor RC will be required and that will lower the voltage across VCE. Knowing this, it is reasonable to assume that VCC of 2 volts will be divided with a voltage drop of about 0.5V for RC with the remaining 1.5V across the device VCE.10.Create a new design to calculate bias valuesThe next steps will sweep only base current for a fixed value of VCE at 1.5 volts. This will allow you to determine values of base-emitter voltage VBE that can be used to calculate the bias resistor values.a.Save the dc_curves schematic. Next, save it with a new name asfollows: click File > Save As and when the dialog box appears, type ina new name: dc_bias. Now, you have three designs in the networksdirectory: bjt_pkg, dc_curves and dc_bias.b.If only one variable is swept, it is more effective to sweep it in theSimulation controller and not in a Parameter sweep. Therefore, deletethe Parameter Sweep. Refer to the schematic here to: 1) edit the DCcontroller to sweep IBB: 1uA to 11 uA in 1 uA steps, 2) set Vdc =1.5V, and 3) remove VCE from the VarEqn by editing it (double click)and using the Cut button to remove VCE as a variable.c.Insert a node name to allow you to get simulation data from a node onthe schematic. Click the icon or use the command: Component >Name Node. When the dialog appears, type in the name VBE and clickon the node at the base of the transistor.VCE is cut from theDC controller,d. Save and Simulate : Save the new design by clicking the save icon –this is always good practice. Next, check the dataset name: Simulation > Setup ) as in the previous simulation. Be sure it appears as: dc_bias and then Simulate .11. Display the data (dc_bias) in a listIn this step, you will use the same data display window that contains the dc_curves data. In fact, you can plot numerous datasets in the display but you must explicitly define (dataset name..) the data to be displayed.a. In the current Data Display window, notice that the default dataset is dc_curves. This is OK. However, if you change the default todc_bias , you will see that the plot becomes invalid because the data is not the same array size as the two dimensional one. This is normal. Try this now as shown and then set it back to dc_curves .b. Now, in the current Data Display window, make room for the new data by using the zoom and view icons . Then insert a new list .c. When the list dialog box appears, select thedc_bias dataset and, add VBE and IC . You should get results similar to those here where IC is veryclose to 1 mA.d.Draw a box around the values of interest as shown here. To do this,click the rectangle icon from the tool bar and draw it on the list. This is one way to highlight the data. Also, the data display window by usingSave As and giving it a name like: dc_data.12.W rite an equation to calculate Rba.On the data display,insert an equation byclicking on the equationicon and then clickingin the data displaywindow:b.When the dialog appears, type in the equation as shown by typing andusing the Insert button. First, select the dc_bias dataset in the upperright (circled). To write the equation type the first part only: Rb = (1.5 -and select VBE and click <<Insert<<. Then type in the parenthesisand division sign: )/. Then insert IBB in the same way and click OK. If the equation is RED (invalid), repeat the step or ask the instructor forhelp.IMPORTANT NOTES on writing equationsEquations that operate on data can either be explicit or generic:The difference in these two equations is in the data being referenced, especially the default dataset in the case of the generic equation. Also, note that equations and data are CASE SENSITIVE.c. Verify how the generic equation described above will work. Be sure the data display shows dc_curves as the default dataset . Now, insert another equation and type it in as shown (generic version):Rb1 = (1.5 - VBE) / IBB . After you click OK and it will be red (invalid)d. Now, change the default dataset to dc_bias (at the top of the display) and verify that it is valid.Now, continue with the design by calculating the collector resistor.e. Write an equation for resistor Rc . You should be able to do this based on what you learned in the previous steps.Generic Equation: When no equation applies to the default dataset.Explicit Equation: Areferenced: name..f.List the values Rb and Rc.Insert a List and when thefirst dialog appears, selectEquations by clicking thearrow. Then Add Rb and Rcand click OK.g.When the list appears, you will then see a table of values for Rb and Rcthat correspond to the value of IBB. As a rule, you always get theindependent variable (here IBB) when you list or plot data.h.Increase the size of a display (if you see dots …after the entries), bydragging the corner of the list. If dots appear after a number or name, it indicates there is more data and you shouldincrease the size of the list or plot.i.Draw a box (rectangle around the desired values to read it easier. Thenedit the list (double click) and select Plot Options. Now, type in a title and change the format as shown by using the More button if desired.j.Be sure to save the display (.dds file). With these values of Rb and Rc, the next step is to bias the device and test the bias network.13. Set up a new design to test the bias networkFor this step, you will create the schematic design without using a template. During this process you will learn some efficient ways to do this.a. Open a new schematic from the existing one, using the File > Newcommand or the icon and name it: dc_net . Notice that this dialog allows you to name the new design and gives you other options.b. In the new schematic (dc_net), insert your sub circuit bjt_pkg by typing in the name in the component history list:c. Set the value of beta to: 144d. Goto LumpedComponents palette and insert a resistor as the base resistor. Notice that “R” appears in the historylist when you do this.e. Insert the collector resistor and rotate it: put the cursor in the history list “R” and press Enter. Immediately, when the resistor is attached to your cursor, click the –90 rotate icon shown here and the component will increment 90 degrees – then insert it.f. Insert a current probe (I_Probe) from the palette or type it in.Connect it to the top of the collector resistor.After you connect the component, you can drag it and it isautomatically wired.g. Finish building the circuit as follows :• Rename and assign resistors: Rb = 100 K ohms and Rc = 470 ohms .• Rename the I_Probe: IC• Insert V_DC supply set at 2 V from (Sources-Frequency Domain palette).• Insert a node name at the collector as VC .• Wire the circuit and organize it.NOTE on Name Node : To remove a named node , click Edit > Component >Remove Node Name or you can rename the node with a blank (click the icon and try it). This step is to show how to remove a node name – you may need it later on .h. Insert a DC simulation controller(Simulation-DC palette).14.Simulate and verify the bias network conditionsFor this you do not need to display the data. Instead, you will simply annotate the schematic to verify that IC meets the 1 mA specification and that bias designconsideration (described earlier) is accurate.a.Press the F7 keyboard key and the simulation will be launched with thedataset name that is the same as the schematic – this is the default. Youcan verify this by reading the status window:b.Annotate the current and voltage at the nodes. Click on the menucommand: Simulate > Annotate DC Solution. Now you should seethe voltage and currents at the nodes. Be sure that you have about 1 mAof collector current with VCE about 1.5 V. If not, check your work.VCE is 1.5 voltsIC is 1 mA15. Sweep Temperaturea.Edit the DC controller – select it and click the edit icon.b.In the Sweep tab, enter the ADS global variable temp (default isCelsius) as shown here and enter the sweep range: -55 to 125 @ 5step. Also, in the Display tab, click the boxes to display the annotation on the controller – click Apply to see it and OK to dismiss the dialog.c.Set the simulation dataset name todc_temp, click Apply to assign thatdataset name, and then Simulate.Lab 2: DC Simulations2-21d. Plot the results in a rectangular plot as VC vs temp - you should be able to do this as shown:The plot should look like the one shown here: collector voltage decreases as the temperature increases. You can use this temperature sweep method for anysimulation in the future.Lab 2: DC Simulations2-22EXTRA EXERCISES1. Plot current (probe) vs. temperature.2. Try these commands:a. Select the bjt and click the command: Edit > Component > Break Connections. Reinsert the bjt and see what happens.b. Spend a few moments experimenting with the other Simulation menu commands: Highlight Node and Detailed Device Operating Point. These are only available after a dc simulation.c. Go to the data display: Use the right mouse button and experiment with the selections.2. Replace the Gummel-Poon model card with another model (Mextram) and resimulate. Afterward, compare the results.。

Android中五种常用对话框的使用

Android中五种常用对话框的使用

Android中五种常⽤对话框的使⽤场景Android中常⽤的五种对话框为常规对话框、带列表的对话框、⾃定义的对话框、带进度条的对话框、带⽇期选择器的对话框。

注:实现常规对话框新建⼀个空项⽬,调整activity_main.xml的布局为LinearLayout,并添加⼀个Button,设置其点击事件<Buttonandroid:id="@+id/button_normal_dialog"android:layout_width="match_parent"android:layout_height="wrap_content"android:onClick="startNormalDialog"android:text="启动常规对话框" />然后在activity中实现其点击⽅法/**** 启动常规对话框* @param view*/public void startNormalDialog(View view){new AlertDialog.Builder(this).setIcon(R.drawable.ic_launcher_background).setTitle("公众号:霸道的程序猿").setCancelable(false).setMessage("是否删除该条记录").setPositiveButton("是", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {Toast.makeText(MainActivity.this,"删除记录成功",Toast.LENGTH_LONG).show();}}).setNegativeButton("否", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {Toast.makeText(MainActivity.this,"取消删除记录",Toast.LENGTH_LONG).show();}}).show();}运⾏项⽬查看效果带列表的对话框在布局⽂件中添加⼀个按钮<Buttonandroid:id="@+id/button2"android:layout_width="match_parent"android:layout_height="wrap_content"android:onClick="startListDialog"android:text="启动带列表的对话框" />在activity中实现其点击⽅法/*** 启动带列表的对话框* @param view*/public void startListDialog(View view){final String[] items = {"关注","公众号","霸道的程序猿","获取","编程教程与资源"};new AlertDialog.Builder(this).setTitle("公众号:霸道的程序猿").setCancelable(false).setSingleChoiceItems(items, 0, new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {Toast.makeText(MainActivity.this,items[which],Toast.LENGTH_LONG).show(); }}).setPositiveButton("OK",null).show();}运⾏之后查看效果⾃定义视图的对话框在layout下新建layout资源⽂件dialog_view.xml<?xml version="1.0" encoding="utf-8"?><androidx.appcompat.widget.LinearLayoutCompatxmlns:android="/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation= "vertical"><EditTextandroid:id="@+id/text_username"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:hint="⽤户名"android:inputType="textPersonName" /><EditTextandroid:id="@+id/text_pwd"android:layout_width="match_parent"android:layout_height="wrap_content"android:ems="10"android:hint="密码"android:inputType="textPersonName" /></androidx.appcompat.widget.LinearLayoutCompat>然后在主布局⽂件中添加⼀个按钮<Buttonandroid:id="@+id/button3"android:layout_width="match_parent"android:layout_height="wrap_content"android:onClick="startCustomDialog"android:text="启动⾃定义的对话框" />在activity中实现其点击⽅法/*** 启动⾃定义的对话框* @param view*/public void startCustomDialog(View view){View v = View.inflate(this,yout.dialog_view,null);final EditText user = v.findViewById(R.id.text_username);final EditText pwd = v.findViewById(R.id.text_pwd);new AlertDialog.Builder(this).setTitle("公众号:霸道的程序猿").setCancelable(false).setView(v).setPositiveButton("登录", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {String username = user.getText().toString().trim();String password = pwd.getText().toString().trim();Toast.makeText(MainActivity.this,"⽤户名:"+username+"密码:"+password,Toast.LENGTH_LONG).show(); }}).show();}运⾏之后查看效果带进度条的对话框在布局⽂件中添加按钮<Buttonandroid:id="@+id/button4"android:layout_width="match_parent"android:layout_height="wrap_content"android:onClick="startProgressDialog"android:text="启动带进度条的对话框" />在activity中实现其点击⽅法/*** 启动带进度条的对话框* @param view*/public void startProgressDialog(View view){final ProgressDialog progressDialog = new ProgressDialog(this);progressDialog.setTitle("公众号:霸道的程序猿");progressDialog.setCancelable(false);progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);progressDialog.show();new Thread(new Runnable() {@Overridepublic void run() {for(inti=1;i<=20;i++){try {Thread.sleep(200);} catch (InterruptedException e) {e.printStackTrace();}progressDialog.setProgress(progressDialog.getProgress()+5);}progressDialog.dismiss();}}).start();}运⾏之后查看效果带⽇期选择器的对话框在布局⽂件中添加按钮<Buttonandroid:id="@+id/button5"android:layout_width="match_parent"android:layout_height="wrap_content"android:onClick="startDatePickDialog"android:text="启动带⽇期选择器的对话框" />在activity中实现其点击⽅法/*** 启动带⽇期选择器的对话框* @param view*/public void startDatePickDialog(View view){Calendar calendar = Calendar.getInstance();int year = calendar.get(Calendar.YEAR);int month = calendar.get(Calendar.MONTH);int day = calendar.get(Calendar.DAY_OF_MONTH);new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {@Overridepublic void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {Toast.makeText(MainActivity.this,"选中了"+year+"年"+month+"⽉"+dayOfMonth+"⽇",Toast.LENGTH_LONG).show(); }},year,month,day).show();}运⾏之后查看效果activity_main.xml完整代码<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="/apk/res/android"xmlns:app="/apk/res-auto"xmlns:tools="/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"tools:context=".MainActivity"><Buttonandroid:id="@+id/button_normal_dialog"android:layout_width="match_parent"android:layout_height="wrap_content"android:onClick="startNormalDialog"android:text="启动常规对话框" /><Buttonandroid:id="@+id/button2"android:layout_width="match_parent"android:layout_height="wrap_content"android:onClick="startListDialog"android:text="启动带列表的对话框" /><Buttonandroid:id="@+id/button3"android:layout_width="match_parent"android:layout_height="wrap_content"android:onClick="startCustomDialog"android:text="启动⾃定义的对话框" /><Buttonandroid:id="@+id/button4"android:layout_width="match_parent"android:layout_height="wrap_content"android:onClick="startProgressDialog"android:text="启动带进度条的对话框" /><Buttonandroid:id="@+id/button5"android:layout_width="match_parent"android:layout_height="wrap_content"android:onClick="startDatePickDialog"android:text="启动带⽇期选择器的对话框" /></LinearLayout>MainActivity完整代码package com.badao.androidstudy;import androidx.appcompat.app.AlertDialog;import androidx.appcompat.app.AppCompatActivity;import android.app.DatePickerDialog;import android.app.ProgressDialog;import android.content.DialogInterface;import android.os.Bundle;import android.view.View;import android.widget.DatePicker;import android.widget.EditText;import android.widget.Toast;import java.util.Calendar;public class MainActivity extends AppCompatActivity {@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(yout.activity_main);}/**** 启动常规对话框* @param view*/public void startNormalDialog(View view){new AlertDialog.Builder(this).setIcon(R.drawable.ic_launcher_background).setTitle("公众号:霸道的程序猿").setCancelable(false).setMessage("是否删除该条记录").setPositiveButton("是", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {Toast.makeText(MainActivity.this,"删除记录成功",Toast.LENGTH_LONG).show(); }}).setNegativeButton("否", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {Toast.makeText(MainActivity.this,"取消删除记录",Toast.LENGTH_LONG).show(); }}).show();}/*** 启动带列表的对话框* @param view*/public void startListDialog(View view){final String[] items = {"关注","公众号","霸道的程序猿","获取","编程教程与资源"};new AlertDialog.Builder(this).setTitle("公众号:霸道的程序猿").setCancelable(false).setSingleChoiceItems(items, 0, new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {Toast.makeText(MainActivity.this,items[which],Toast.LENGTH_LONG).show(); }}).setPositiveButton("OK",null).show();}/*** 启动⾃定义的对话框* @param view*/public void startCustomDialog(View view){View v = View.inflate(this,yout.dialog_view,null);final EditText user = v.findViewById(R.id.text_username);final EditText pwd = v.findViewById(R.id.text_pwd);new AlertDialog.Builder(this).setTitle("公众号:霸道的程序猿").setCancelable(false).setView(v).setPositiveButton("登录", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {String username = user.getText().toString().trim();String password = pwd.getText().toString().trim();Toast.makeText(MainActivity.this,"⽤户名:"+username+"密码:"+password,Toast.LENGTH_LONG).show(); }}).show();}/*** 启动带进度条的对话框* @param view*/public void startProgressDialog(View view){final ProgressDialog progressDialog = new ProgressDialog(this);progressDialog.setTitle("公众号:霸道的程序猿");progressDialog.setCancelable(false);progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);progressDialog.show();new Thread(new Runnable() {@Overridepublic void run() {for(int i=1;i<=20;i++){try {Thread.sleep(200);} catch (InterruptedException e) {e.printStackTrace();}progressDialog.setProgress(progressDialog.getProgress()+5);}progressDialog.dismiss();}}).start();}/*** 启动带⽇期选择器的对话框* @param view*/public void startDatePickDialog(View view){Calendar calendar = Calendar.getInstance();int year = calendar.get(Calendar.YEAR);int month = calendar.get(Calendar.MONTH);int day = calendar.get(Calendar.DAY_OF_MONTH);new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {@Overridepublic void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {Toast.makeText(MainActivity.this,"选中了"+year+"年"+month+"⽉"+dayOfMonth+"⽇",Toast.LENGTH_LONG).show(); }},year,month,day).show();}}。

MFC 对话框和常用教程

MFC 对话框和常用教程

第五章对话框和常用控件对话框是Windows应用程序中最重要的用户界面元素之一,是与用户交互的重要手段,在程序运行过程中,对话框可用于扑捉用户的输入信息或数据。

对话框是一个特殊类型的窗口,任何对窗口进行的操作(如:移动、最大化、最小化等)都可在对话框中实施,一般来说,在对话框中通过各种控件(如:按钮、编辑框、列表框、组合框等)来和用户进行交互。

控件是在系统内部定义的用于和用户交互的基本单元。

一、对话框的使用Visual C++提供的对话框编辑器能“可视”地进行设计、编辑,并可用ClassWizard为对话框从CDialog基类中派生一个类,MFC的CDialog类封装了用于对话框的显示、关闭等操作的许多功能函数,例如:DoModal函数用来显示模式对话框并返回用户操作的结果。

1、模式对话框(为186附加举例页)所谓模式对话框是指,当对话被弹出时,用户必须在对话框中进行相应的操作,在退出对话框之前,对话框所在的应用程序不能继续执行。

平常我们所见到的对话框大多是模式对话框。

例:模式对话框(通过菜单命令弹出)1)建一个单文档(SDI)应用程序2)创建对话框模板Insert→Resource→选中Dialog→单击New拖过一个静态文本,鼠标对准它,按右键点properties改标题为“新建模式对话框”。

3)鼠标右键对准对话框的任何位置单击,选择properties选项,设置ID为IDD_MYDIALOG 4)给对话框创建类双击新建对话框的任何位置,单击OK,写类名为“CMyDlg”,保证”CDialog”作为该类的基类。

5)创建菜单命令:a)打开资源编辑器的菜单项Menub)双击IDR_MAINFRAMEc)双击右边空白菜单,点开pop_up(让它是空白),在名字处写”弹出对话框(&A)”,ID 处写ID_PUPDIALOG6)将菜单命令连接到主框架程序中,完成ID_PUPDIALOG的消息映射:View→ClassWizard→保证Class name里是CMainFrame,在ObjectIDs里找到ID_PUPDIALOG点黑→Messages里(右边)点COMMAND建立主框架对象方法并加代码:void CMainFrame::OnPupdialog(){ CMyDlg MyDlg;MyDlg.DoModal(); //DoModal()是CDialog类成员函数,通过调用该//函数将显示对话框。

Multisim实验室教材说明书

Multisim实验室教材说明书

Lab 5: Experimentations with MultisimThe goal of this laboratory is to learn some useful features of the Multisim simulation software and to highlight some differences between the computations as they are done in class and the results of Multisim simulations and benchtop experiments.We use a guided discovery approach, in which we do pencil-and-paper computations of the circuit outputs to gain a basic understanding of how these circuits work. In the lab, we will build the circuits in Multisim first, to examine how they behave in simulation and identify some differences between the computations and the simulations. Last, we build the circuits on the benchtop with hardware to further understand how the real circuits differ from the simulated systems.Prelab:In exercise 1, you will work with the circuit below:Multisim has a generic blue LED which turns on when the LED current is 5 mA. In the lab, you will work with the blue LED you used in a previous lab (reference C503B-BCN). For the pre-lab:1) Determine the setting of the potentiometer that sets the LED current to 10 mA. What arevoltages A, B, and C for this setting of the potentiometer.2) Determine the setting of the potentiometer for which the current exceeds the maximumcurrent of one of the Zener diodes. Which Zener diode reaches its maximum current first when the potentiometer resistance is decreased.In exercise 2, you will work with the circuit shown below:1000ΩKey=A Blue LEDC503B-BCNACBThe waveform generator is used to represent an ac voltage source. The frequency is set to 60 Hz and the amplitude of the sine wave is set to 10 V, peak. The DF06MA diode bridge is of the same family as the DF02 and DF04 diode bridges you used in a previous lab.For the prelab, estimate the dc (i.e. mean) load voltage, dc load current, dc diode current, and peak-to-peak ripple voltage.Based on the data sheet, what range of dc diode drop do you expect to see given the expected diode current?Determine the ripple voltage when the capacitance is changed to 4.7 µF, 2.2 µF, and 1 µF. Do you believe these values to be correct? Explain your argument.In exercise 3, you work with an operational amplifier used to build a non-inverting amplifier. The amplifier receives its input from the function generator and displays its output on the oscilloscope. The circuit is shown below.Determine the gain of the amplifier and the peak-to-peak load voltage when the waveform generator settings are f = 100 Hz, amplitude = 50 mV peak. Determine the peak load current when the input amplitude is 50 mV peak. Estimate the peak load current when the load resistance is 10kΩ, 1 kΩ, 100 Ω, 10 Ω. Recall the actual op-amp device needs to be powered and in the diagram above, V+ = 12 V and V- = -12 V.You will turn-in a draft of your answers as prelab for this assignment. Show drawings of all the circuits and the results of all the analyses/calculations you did for the prelab.Lab room experimentation:Part 1: DC diode circuitA.Developing a circuit for simulationStart Multisim.Build the circuit shown in the first pre-lab exercise. Place one of the two Zener diodes on the sheet. Highlight the diode and press CTRL-R to rotate the diode by 90 degrees clockwise.The “In Use List” drop down menu in the top toolbar can be used to retrieve components you already place on the sheet to replicate them. Select the diode you previously placed and drop it on the sheet. Then, right click and select “replace component” to access the available Zener diodes in the data base. Replace with the other Zener diode.Place all the other components from the pre-lab circuit on the sheet. Wire all the components together to build the circuit from the pre-lab.Net names can be changed and used to document your design. Double-click on the wire between the potentiometer and the diodes. Set the preferred net name to “Input_voltage” then press “ok”.Labels can be set to document the design. Double click on the blue LED and set the label to “Blue LED”.Text and drawings help further illustrate and document the design. Select “Place – Text” and type in the reference of the blue LED: C503B-BCN next to the LED. Place a Letter A next to the wire between the LED and the top Zener. Select “Place – Graphics” to draw a line between the letter A and the junction between the LED and the top Zener. Right click on the wire and select “Arrow” to create a pointing arrow between the letter A and the net. Repeat to label the other nets that join the different diodes to each other. Save your design.B.Configure MultisimThen, you explore options to configure the appearance of the display. You will set the sheet Properties parameters which affect the interface for the design of the current circuit.Select Options»Sheet Properties.Click the Sheet visibility tab. In the Component section, enable/disable the options such as Labels, RefDes, and Values and preview the result by selecting “Apply” at the bottom of the tab. Configure to have the labels and values enabled. (Labels are made of text you choose yourself to document your design. RefDes are selected by Multisim and reflect the type of component: D for diode, R for resistor, … and the order in which these components are placed on the sheet).In the Net names subsection, you can choose if you want to have net (nodes) names shown for all nets, hide all, or a net-specific setting (recommended). For this exercise, select Show all. Note that net 0 is reserved for the ground reference in all circuits.In the Colors tab you can change the colors used in the workspace. The default is a pre-configured White Background option. Change the menu option to (black & white) and select “apply”. Then switch to “Custom”. Set the Components with model to blue, wires to green, and text to red. Select “Apply”. Set to a color pattern you are comfortable with and select “Apply” again.Click the Workspace tab. In this tab you can turn on or off the grid, page bounds, and the page border. You can also change the sheet size and units. Experiment with turning the grid on and off.Click the Wiring tab. Set the Wire width to 2. Then Click OK to exit the Sheet Properties.Then, you explore options to configure Multisim more generally.Select Options»Global Preferences.Select the Paths tab and set the Design default path to the desktop folder on your computer (use … at the end of the present path to reconfigure). Select “Apply”.Select the Simulation tab and set the background color for the graphs and instruments to White. Select “Apply”.Select the Save tab. If you want to have a Security Copy created every time you save the circuit; you can also configure an Auto-backup that will save the circuit at every interval you specify. You can also Save simulation data with instruments, which allows you to specify how much data will be saved with the instruments included in your schematic. Only check the “Auto-backup” tab and select “Apply”.Select the Components tab. In this tab you can select how the Component Browser behaves every time you place a component and what Symbol standard to use.Select the General tab. You can customize the behavior of many tasks in this tab such as selecting components, using the mouse-wheel, and most importantly, Wiring.Click OK to close the Global Preferences dialog. Note that the “Sheet properties” apply to the design file you are working with and are saved with the file itself. “Global preferences” apply to every design project you are working with, and are not saved with the file, these preferences are saved in a User Configuration file.C.Running the simulationPress on the green arrow in the top toolbar to start the simulation. Press A and shift-A to vary the resistance of the potentiometer.For what value of the resistance does the LED light up?Place a voltage probe between the LED and the 1N5235B Zener. The default probe displays parameters for the peak-to-peak, rms, and instantaneous voltage, as well as frequency which are irrelevant here since we are working with a dc circuit.Double click on the probe and on the appearance tab, set the font to 12 to make the display more readable. Then, select apply. On the parameters tab, select “custom”, then “show” to place a check mark only next to V(dc). Then press “OK”.Place a current probe on the sheet and configure it to show only I(dc). Then press “OK”.Adjust the potentiometer so that the LED current is 10 mA (You will need to stop the simulation and modify the potentiometer value so that the incremental change in resistance is 0.1%). Compare the value you obtained from the simulation with the computations from the pre-lab.Move the probe to measure the voltage at points A, B, and C. Compare with the computations you did for the prelab.Stop the simulation. Place a vertical ammeter in your circuit (from the indicator toolbar). Run the simulation again. Note that the probe is much more convenient than the ammeter because it can be configured and moved while the simulation is running. The ammeter can simulate a more realistic device than the probe because its internal resistance can be modified.D.Assembling the hardware and measuring the voltages and currentsAssemble on the protoboard the same circuit as that used in the pre-lab and in the Multisim simulation.For the potentiometer, the 3 leads must be inserted as is without any bend in the protoboard. Then build the circuit by extending wires between the “wiper” and one end lead of the potentiometer.In your circuit, include the ammeter from virtual bench. Set the maximum current on the virtual bench power supply to 20 mA. (Why do we take this precaution?)Power up the circuit and adjust the potentiometer position to set the circuit current to 10 mA. Measure the voltages at the nodes in the circuit that correspond to points A, B, and C in the drawing and simulation.Turn off the power. Disconnect the wires that extend from the potentiometer to the other elements of the circuit and measure with the ohmmeter the resistance of the potentiometer.Part 2: Filtered rectifier circuitA.Develop the filtered rectifier circuit in MultisimOn a new sheet, assemble the filtered rectifier circuit from the pre-lab. Use a 10 µF capacitor and the DF06 diode bridge.Two channel oscilloscopeFrom the instrument toolbar on the right, place the waveform generator on the circuit. Wire the positive terminal and the center (COM) terminal to the ac pins of the diode bridge.Double click on the function generator symbol to open its front panel. Configure to generate a sine wave with a 60 Hz frequency and a 10 V peak amplitude. The front panel for all instruments is a floating window, which means you can leave it open and continue working with your circuit or run the simulation. The settings of the instrument can be changed while the simulation is running. When you close the window, the last configuration settings remain applied to the instrument.Place a two-channel oscilloscope and wire channel A to the load terminal. Double click on the wire and change the net color (I used red). When the simulation runs, the oscilloscope trace color matches that of the net.Run the simulation. Configure the oscilloscope time base and channel A (try 2 V/div, Ypos = -3). Use the cursors to estimate on the display the dc voltage.Change the channel A setting to AC to only see the oscillatory portion of the waveform. Change the channel A settings to see the AC waveform fill the display. Use the cursors to estimate the peak to peak ripple. (You may stop the simulation to “freeze” the waveform).Press the “save” button on the oscilloscope. Select a file name and for the file type, select “.lvm”. Save the file on the desktop. Open the file with Excel. Below the preamble, you will see time values (X) and the trace 1 values (Channel A) organized in two columns. Create an X-Y graph to display a few cycles of the waveform.Return to Multisim. Place a voltage probe at the location of the load and configure the probe to display the dc voltage, the peak-to-peak voltage (i.e. the ripple), and the frequency. Run the simulation and compare to the readings on the scope display. Use a current probe to measure the dc load voltage.Modify the circuit to set the capacitor value to 4.7 µF, 2.2 µF, and 1 µF. Measure with the probe or on the oscilloscope the dc voltage and the ripple. Compare your simulations with the results of the prelab.B.Assembling the hardware and measuring the dc output voltage and ripple voltageAssemble on the protoboard the filtered diode rectifier from the pre-lab and Multisim simulations. Use a DF02 or DF04 diode bridge.Use the waveform generator from the virtual bench device to power up your bridge circuit. Use the oscilloscope probe to measure the load voltage.Turn on the virtual bench and tabulate the dc voltage and peak-to-peak ac voltage (i.e. the ripple voltage) for 4 or 5 values of the capacitance between 22 µF and 1 µF (depending on availability of parts in the lab). Estimate the dc load current.Part 3: Op-amp amplifierA. Develop the op-amp amplifier in MultisimOn a new sheet, assemble the op-amp amplifier circuit shown below. Use a LM 741 H op-amp. To power the device, connect two 12 V dc supplies as shown on the diagram. Wire the middle point to ground.From the menu, select “place – connector – on page connector”. Drop the connector on the sheet. Name the connector V+ and attach to the positive side of the top +12 V supply. Repeat with asecond “on page connector”. Name the connector V- and attach to the negative side of the bottom +12 V supply.Wire the op-amp with its 100 k Ω feedback resistor, 1 k Ω input resistor, and 10 k Ω load resistor. Select “place connector – on page connector” one more time. After the connector is dropped on the sheet, select to associate it to V+, then wire the connector to pin 7 of the op-amp. Repeat and use another connector associated to V- for pin 4 of the op-amp. Using connectors in this way minimizes the long wires connected to the power supplies of complex circuits.Run the simulation with the waveform generator set to a frequency of 100 Hz, 1000 Hz, 10,000 Hz, 100,000 Hz. What do you observe for the amplitude of the output waveform?Double click on the net at the output of the op-amp and note the net number. Set the preferred net name to “output”. To capture the effect of frequency on the amplifier gain in one shot, we can usethe analysis capability of Multisim. On the menu bar, select “simulate – analyses and simulations – ac sweep”.Configure the frequency parameters to range from 1 Hz to 1,000,000 Hz with 100 points per decade.Click on the output tab. Among the variables in the circuit, select V(output) and add it to the variables for analysis. Press “run”. Multisim displays a plot of the amplitude and phase of the output voltage as a function of frequency. Select “Cursor – show cursor” on the menu.Use the cursor to measure the amplitude (y) of the output voltage at multiple frequencies between 100 Hz and 100 KHz. On the top menu, select “Export to Excel” to export the frequency response of the op-amp amplifier. Save the excel sheet.While sweeping in frequency and measuring the amplifier output would be relative straightforward to do on the bench, other types of simulations are more difficult to do with real devices.Replace the waveform generator at the input with a DC power supply set to deliver a voltage of 50 mV. On the menu bar, select “simulate – analyses and simulations – parameter sweep” to change the value of the load resistor between 1 Ω and 1000 Ω. Configure the sweep to “device parameter”. Device type to “resistor”. The resistor is the DefRes of the load (R3 in the image below). Configure the sweep to go from 1 Ω to 1 kΩ in 101 points and to display the “DC operating point”.Run the simulation. The graph shows the voltage output amplitude for an input of 50 mV. The output voltage increases when the resistance increases to about 200 ohms and then stabilizes to the expected value of ~ 5 V. Export the data to Excel. Note that the resistance for which the output plateaus. Use the Excel sheet to compute the output current of the op-amp. What do you notice in the relation between load resistance and output current?B.Develop the op-amp amplifier on the benchtopBuild the op-amp amplifier circuit on your protoboard with a 10 kΩ load. Use a 741 op-amp powered with +/- 12 volt supplies from the virtual bench device.Connect the input of the op-amp amplifier to the waveform generator. Connect the input and the output of the amplifier to the two channels of the oscilloscope.Set the input voltage amplitude to a value you select knowing the amplifier gain and the power supply voltages of the op-amp (the output cannot get out of the range of the supply voltages). Measure the amplitude of the output voltage when the input frequency is varied between 100 Hz and 100 kHz. Take at least 10 measurements. Compute the amplifier gain for the frequencies you tested.Set the frequency at 10 kHz. Change the feedback resistor so the gain of the amplifier is 2, 11, 101, 1001. Adjust the input voltage amplitude as necessary. Measure the amplitude of the output voltage for the different gains.Report:Each work group will submit a report due one week after the laboratory experiment which should include the following sections:1.For the first circuit, report your calculations from the prelab, the results of the simulations,and the results of the experimentation (including screenshots of the Multisim andvirtualbench displays). Tabulate these results to highlight the comparison and perform anerror analysis to compare the pencil-and-paper computations and the Multisim simulations to the experimental measurements. Discuss the differences and sources of error.2.For the second circuit, report your calculations from the prelab, the results of thesimulations, and the results of the experimentation (including screenshots of the Multisimand virtualbench displays). Tabulate these results to highlight the comparison and perform an error analysis to compare the pencil-and-paper computations and the Multisimsimulations to the experimental measurements. Discuss the differences and sources oferror.3.For the third circuit, report your calculations from the prelab, the results of the simulations,and the results of the experimentation (including screenshots of the Multisim andvirtualbench displays). Tabulate and plot the results to show the effect of the inputfrequency and load resistance on the amplifier gain (from the simulations) and the effect of the input frequency and amplifier anticipated gain (1+Rf/Ri) on the actual gain measured as Vout/Vin at 10 kHz. Discuss these results to highlight the comparison and perform an error analysis to compare the pencil-and-paper computations, the Multisim simulations to theexperimental measurements. Discuss the differences and sources of error.。

flow3d单词翻译

flow3d单词翻译

Vvect刚体初速度的矢量Delete source bitmap files--删除原位图文件Frame rate--帧速率A VI capture--动画捕捉A VI filename--动画文件名FLOW-3D (R) --FLOW-3D 简体中文版Interface version --接口版本Solver version--求解器版本Number of Processors--处理器数量Total Physical Memory (RAM) --物理内存总数(RAM) f3dtknux_license_file--授权许可文件Host Name--主机名F3D_VERSION --软件版本Operating System--操作系统Type--类型Porous--孔隙Porosity --孔隙率Lost foam--消失模Standard--标准Thermal conductivity--导热率Material name--材料名称Custom--自定义Surface area multiplier--面积倍增Unit system--系统单位Solid properties --固体属性Initial conditions--初始化条件Surface properties--表面属性Solids database--固体数据库Surface roughness--表面粗糙度Temperature--温度Temperature variables--温度变化Saturation temperature --饱和温度Units=CGS --单位=公制Solutal expansion coefficient --溶质膨胀系数Ratio of solute diffusion coefficient ---比溶质扩散系数Surface tension --表面张力Gas constant--气体常量Thermal conductivity --导热率Surface tension coeff--表面张力系数Critical solid fraction--关键凝固比率Solidus temperature--固相线温度Phase change--相变Material name --材料名称Thermal properties --热性质Custom --自定义Constant thinning rate--不断变薄率Units=SI -单位=国际单位制Partition coefficient--分隔系数Dielectric constant --介电常数Specific heat --比热Eutectic temperature --低共熔温度Coherent solid fraction --凝固Thermal expansion --热膨胀Unit System --系统单位Units=custom --单位=自定义Units=slugs --单位=斯勒格Reference temperature--起始温度Latent heat of vaporization--汽化潜热Reference solute concentration--参考溶质浓度Pure solvent melting temperature --熔点温度Liquidus temperature--液相温度Viscosity --黏度Solidification--凝固Vapor specific heat --蒸气比热Density--密度Temperature sensitivity--温度敏感性Saturation pressure --饱和压力Temperature shift --温度变化Compressibility --可压缩性Contact angle --接触角度Latent heat of fusion (fluid 1) --熔解潜热(流体1)New fluid database --新流体数据库Accommodation coefficient --调节系数Strain dependent thinning rate --应变黏度系数Constant thickening rate --不断增厚率added to materials database --添加到材料库cannot be added. --不能被添加Record already exists in materials database--在材料库已经存在该记录. New saved in materials database--新保存到材料库中.Could not find material DB--没有发现材料数据Add--添加Close--关闭Add Mesh Points --添加网点Direction --方向New Point --新的点Mesh Block --网格块2-D advanced options --2-D 高级选项Option--选项Add --添加Type--类型Component--组Cancel--取消Browse --浏览Source --来源File name--文件名Advanced --高级Numerics--数值运算Advanced options--高级选项sigma --表面张力系数Air entrainment --卷气Activate air entrainment model --激活卷气模型Surface tension coefficient --表面张力系数Dialog--对话框Remove mesh constrains--清除网格限制Size of all cells --全部单元尺寸Total Cells--单元总数Baffle options --隔板选项Baffle index --主隔板Baffle color--隔板颜色Hide selected baffles --隐藏选中的隔板Use contour color--使用轮廓颜色Selection method--择伐作业Boundary type --边界类型Specified pressure --规定压力Grid overlay --网格重叠Specified velocity --指定速度Electric potential--电位Stagnation pressure --滞止压力V olume flow rate --体积流量Z flow direction vector--Z 流向Y flow direction vector --Y 流向X flow direction vector--X 流向Electric charge--电荷Mesh Block--网格块Add to component --添加为元件Specific heat --比热Simulate--仿真Stop preprocessor--停止预处理Block distribution--块分配Porous--孔隙Component --组Scalars--标量Add to component --添加为元件Cell size --单元尺寸Render space dimensions --渲染面积Cell size is empty--单元尺寸为空Create mesh block (Cylindrical) --创建网格块(柱状) Total number of cells --单元数量Cylinder subcomponent --子气缸Add to component--添加为元件Radius --半径Setting the default workspace location is required. You can change the location at any time from the Preferences menu.--需要设置本地默认工作区位置.你可以随时通过菜单来改变位置。

BottomSheetDialog控件使用(底部,可拖动弹窗)

BottomSheetDialog控件使用(底部,可拖动弹窗)

BottomSheetDialog控件使⽤(底部,可拖动弹窗)效果图.gif1、添加design依赖implementation 'com.google.android.material:material:1.0.0'2、创建弹窗布局(dialog_bottomsheet.xml)布局有个recycleView 和头部布局<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="/apk/res/android"android:layout_width="match_parent"android:layout_height="wrap_content"android:background="@drawable/sh"android:orientation="vertical"><RelativeLayoutandroid:layout_width="match_parent"android:layout_height="40dp"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_centerInParent="true"android:text="100⾸歌"android:textStyle="bold" /><ImageViewandroid:layout_width="24dp"android:layout_height="24dp"android:layout_alignParentRight="true"android:layout_centerVertical="true"android:layout_marginRight="10dp"android:src="@drawable/error" /></RelativeLayout><androidx.recyclerview.widget.RecyclerViewandroid:id="@+id/dialog_recycleView"android:layout_width="match_parent"android:layout_height="match_parent" /></LinearLayout>3、recycleView 适配器就不写了4、要dialog顶部有弧度的话,创建 drawable 的xml⽂件<shape xmlns:android="/apk/res/android"><cornersandroid:topLeftRadius="10dp"android:topRightRadius="10dp" /><solid android:color="#fff" /></shape>5、到MainActivity中显⽰显⽰dialogprivate void showSheetDialog() {recyclerView = view.findViewById(R.id.dialog_recycleView);recyclerView.setLayoutManager(new LinearLayoutManager(this));mainAdapter = new MainAdapter(yout.item_main, titleList);recyclerView.setAdapter(mainAdapter);bottomSheetDialog = new BottomSheetDialog(MainActivity.this, R.style.DialogTheme);bottomSheetDialog.setContentView(view);mDialogBehavior.setPeekHeight(getWindowHeight());//dialog的⾼度mDialogBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { @Overridepublic void onStateChanged(@NonNull View view, int i) {if (i == BottomSheetBehavior.STATE_HIDDEN) {bottomSheetDialog.dismiss();mDialogBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);}}@Overridepublic void onSlide(@NonNull View view, float v) {}});}private int getWindowHeight() {Resources res = MainActivity.this.getResources();DisplayMetrics displayMetrics = res.getDisplayMetrics();return displayMetrics.heightPixels;}最后:MainActivity.class (有删减)package com.example.bottomsheetdialog;import androidx.annotation.NonNull;import androidx.appcompat.app.AppCompatActivity;import androidx.recyclerview.widget.LinearLayoutManager;import androidx.recyclerview.widget.RecyclerView;import android.content.res.Resources;import android.os.Bundle;import android.util.DisplayMetrics;import android.util.Log;import android.view.View;import android.widget.Button;import com.google.android.material.bottomsheet.BottomSheetBehavior;import com.google.android.material.bottomsheet.BottomSheetDialog;import java.util.ArrayList;import java.util.List;public class MainActivity extends AppCompatActivity {private BottomSheetDialog bottomSheetDialog;private BottomSheetBehavior mDialogBehavior;private RecyclerView recyclerView;private MainAdapter mainAdapter;private List<String> titleList = new ArrayList<>();@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(yout.activity_main);findViewById(R.id.main_btn1).setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View view) {initData();showSheetDialog1();bottomSheetDialog.show();}});}private void showSheetDialog1() {View view = View.inflate(MainActivity.this, yout.dialog_bottomsheet, null);recyclerView = view.findViewById(R.id.dialog_recycleView);recyclerView.setLayoutManager(new LinearLayoutManager(this));mainAdapter = new MainAdapter(yout.item_main, titleList);recyclerView.setAdapter(mainAdapter);bottomSheetDialog = new BottomSheetDialog(MainActivity.this, R.style.DialogTheme);bottomSheetDialog.setContentView(view);mDialogBehavior.setPeekHeight(getPeekHeight());}/*** 弹窗⾼度,默认为屏幕⾼度的四分之三* ⼦类可重写该⽅法返回peekHeight** @return height*/protected int getPeekHeight() {int peekHeight = getResources().getDisplayMetrics().heightPixels;//设置弹窗⾼度为屏幕⾼度的3/4return peekHeight - peekHeight / 3;}private void initData() {for (int i = 0; i < 110; i++) {titleList.add("item" + i);}}}如果要实现⽹易云⾳乐之占⼀半的效果,那dialog的xml⽂件就要限定⾼度如果要实现全屏⾼度的话,设置⾼度⽅法改为这个private int getWindowHeight() {Resources res = MainActivity.this.getResources();DisplayMetrics displayMetrics = res.getDisplayMetrics();return displayMetrics.heightPixels;}。

android自定义Dialog弹框和背景阴影显示效果

android自定义Dialog弹框和背景阴影显示效果

android⾃定义Dialog弹框和背景阴影显⽰效果本⽂实例为⼤家分享了android⾃定义Dialog弹框和背景阴影显⽰的具体代码,供⼤家参考,具体内容如下⾸先需要⾃定义⼀个类,继承Dialogimport android.app.Dialog;import android.content.Context;import android.os.Bundle;import android.view.View;import android.view.ViewGroup;import android.view.WindowManager;import android.widget.Button;import android.widget.TextView;import com.zhiziyun.dmptest.bot.R;/*** Created by Administrator on 2018/1/31.*/public class CustomDialog extends Dialog {private Button yes, no;//确定按钮private TextView titleTv;//消息标题⽂本private TextView messageTv;//消息提⽰⽂本private String titleStr;//从外界设置的title⽂本private String messageStr;//从外界设置的消息⽂本//确定⽂本和取消⽂本的显⽰内容private String yesStr, noStr;private onNoOnclickListener noOnclickListener;//取消按钮被点击了的监听器private onYesOnclickListener yesOnclickListener;//确定按钮被点击了的监听器/*** 设置取消按钮的显⽰内容和监听** @param str* @param onNoOnclickListener*/public void setNoOnclickListener(String str, onNoOnclickListener onNoOnclickListener) {if (str != null) {noStr = str;}this.noOnclickListener = onNoOnclickListener;}/*** 设置确定按钮的显⽰内容和监听** @param str* @param onYesOnclickListener*/public void setYesOnclickListener(String str, onYesOnclickListener onYesOnclickListener) { if (str != null) {yesStr = str;}this.yesOnclickListener = onYesOnclickListener;}public CustomDialog(Context context) {super(context, R.style.Dialog_Msg);}@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(yout.dialog_custom);//按空⽩处不能取消动画setCanceledOnTouchOutside(false);//初始化界⾯控件initView();//初始化界⾯数据initData();//初始化界⾯控件的事件initEvent();}/*** 初始化界⾯的确定和取消监听器*/private void initEvent() {//设置确定按钮被点击后,向外界提供监听yes.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {if (yesOnclickListener != null) {yesOnclickListener.onYesClick();}}});no.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {if (noOnclickListener != null) {noOnclickListener.onNoClick();}}});}/*** 初始化界⾯控件的显⽰数据*/private void initData() {//如果⽤户⾃定了title和messageif (titleStr != null) {titleTv.setText(titleStr);}if (messageStr != null) {messageTv.setText(messageStr);}//如果设置按钮的⽂字if (yesStr != null) {yes.setText(yesStr);}}/*** 初始化界⾯控件*/private void initView() {yes = (Button) findViewById(R.id.yes);no = (Button) findViewById(R.id.no);titleTv = (TextView) findViewById(R.id.title);messageTv = (TextView) findViewById(R.id.message);}/*** 从外界Activity为Dialog设置标题** @param title*/public void setTitle(String title) {titleStr = title;}/*** 从外界Activity为Dialog设置dialog的message** @param message*/public void setMessage(String message) {messageStr = message;}/*** 设置确定按钮和取消被点击的接⼝*/public interface onYesOnclickListener {public void onYesClick();}public interface onNoOnclickListener {public void onNoClick();}@Overridepublic void show() {super.show();/*** 设置宽度全屏,要设置在show的后⾯*/youtParams layoutParams = getWindow().getAttributes();layoutParams.width= youtParams.MATCH_PARENT;layoutParams.height= youtParams.MATCH_PARENT;getWindow().getDecorView().setPadding(0, 0, 0, 0);getWindow().setAttributes(layoutParams);}}这是实体类中的style:<style name="custom_dialog_style" parent="android:Theme.Dialog"><item name="android:windowFrame">@null</item><item name="android:windowIsFloating">true</item><item name="android:windowIsTranslucent">false</item><item name="android:windowNoTitle">true</item><!--除去title--><item name="android:backgroundDimEnabled">true</item><!--半透明--><item name="android:windowBackground">@color/transparent</item><!--除去背景⾊--> <item name="android:radius">10dp</item></style>其中@color/transparent是⼀个透明⾊<color name="transparent">#00000000</color>然后是布局<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:background="#A5000000"><LinearLayoutandroid:layout_width="260dp"android:layout_height="wrap_content"android:layout_centerInParent="true"android:background="@drawable/shape_dialog_msg"android:orientation="vertical"><TextViewandroid:id="@+id/title"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="center"android:layout_margin="15dp"android:gravity="center"android:text="消息提⽰"android:textColor="@color/colorBlack"android:textSize="@dimen/title_text_size" /><TextViewandroid:id="@+id/message"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_gravity="center"android:layout_marginLeft="@dimen/padding_left_right4"android:layout_marginRight="@dimen/padding_left_right4"android:text="提⽰消息"android:textColor="@color/colorBlack"android:textSize="@dimen/textsizi3" /><Viewandroid:layout_width="match_parent"android:layout_height="1px"android:layout_marginTop="15dp"android:background="#E4E4E4" /><LinearLayoutandroid:layout_width="match_parent"android:layout_height="@dimen/buttom_height"android:orientation="horizontal"><Buttonandroid:id="@+id/no"android:layout_width="match_parent"android:layout_height="match_parent"android:layout_weight="1"android:background="@null"android:gravity="center"android:singleLine="true"android:text="取消"android:textColor="@color/blue"android:textSize="@dimen/textsizi3" /><Buttonandroid:id="@+id/yes"android:layout_width="match_parent"android:layout_height="match_parent"android:layout_weight="1"android:background="@null"android:gravity="center"android:singleLine="true"android:text="确定"android:textColor="@color/red"android:textSize="@dimen/textsizi3" /></LinearLayout></LinearLayout></RelativeLayout>下⾯是shape_dialog_msg的代码<?xml version="1.0" encoding="UTF-8"?><selector xmlns:android="/apk/res/android"> <item android:state_pressed="false"><shape android:shape="rectangle" ><!-- 填充的颜⾊前两位是透明度--><solid android:color="#f7f6f6"></solid><!-- 设置按钮的四个⾓为弧形 --><!-- android:radius 弧形的半径 --><corners android:radius="8dip" /><!-- padding:Button⾥⾯的⽂字与Button边界的间隔 --><padding android:bottom="2dp" android:left="2dp" android:right="2dp" android:top="2dp" /></shape></item></selector>准备⼯作都做好了,下⾯就是如何使⽤了//点击弹出对话框final CustomDialog customDialog = new CustomDialog(getActivity());customDialog.setTitle("消息提⽰");customDialog.setMessage("是否暂停⼴告投放?");customDialog.setYesOnclickListener("确定", new CustomDialog.onYesOnclickListener() {@Overridepublic void onYesClick() {//这⾥是确定的逻辑代码,别忘了点击确定后关闭对话框customDialog.dismiss();}});customDialog.setNoOnclickListener("取消", new CustomDialog.onNoOnclickListener() {@Overridepublic void onNoClick() {customDialog.dismiss();}});customDialog.show();以上就是本⽂的全部内容,希望对⼤家的学习有所帮助,也希望⼤家多多⽀持。

系统动力学及Vensim建模与模拟技术

系统动力学及Vensim建模与模拟技术
决定具体事件,因此解决问题的根本出发点是系统结构分析。 系统动力学能解决微分方程组方法难以解决的复杂非线性系统问题。
12
系统动力学的学科基础
Page 13
系统动力学的学科基础可划分为三个层次:
方法论。系统动力学的方法论是系统方法论,其基本原则是将所研究对象 置于系统的形式中加以考察。系统方法论目前还不很完善,系统动力学自 身的发展也将会丰富、充实系统方法论。
8
系统及其构成和结构
Page 9
系统:一个由相互区别、相互作用的各部分有机地联结一 起,为同一目的而完成某种功能的集合体。
系统动力学是认识系统问题和解决系统问题的有效工具之 一。
系统的结构:所谓结构是指单元的秩序。它包含两层意思 ,首先是指组成系统的各单元,其次是指诸单元间的作用 与关系。系统的结构标志着系统构成的特征。例:
2
主要内容
(1)系统动力学简介 系统动力学发展历史 系统动力学主要应用领域 系统动力学学科基础 系统动力学建模基本过程
(2)Vensim 软件简介 软件配置 基本功能 用户界面 模型库及辅助知识
(3)系统动力学及Vensim建模基础 因果链与反馈 因果回路图构建 流图构建
3
Page 3
(ALLOC P)
Reality Check
主要开发者:Bob Eberlein
Ph.D in MIT 前国际系统动力学学会主席 2007国际系统动力学大会主席
25
Page 25
Vensim 软件功能
Vensim PLE
个人学习版。具有一般建模模拟功能,多视窗, 原因追踪, 复合模拟等功能。
技术科学和基础理论。主要有反馈理论、控制理论、控制论、信息沦、非 线性系统理论,大系统理论和正在发展中的系统学。
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Dialog Simulation for Background CharactersDuˇs an Jan and David R.TraumUSC Institute for Creative Technologies,13274Fiji Way,Marina del Rey,CA 90292Abstract.Background characters in virtual environments do not re-quire the same amount of processing that is usually required by main characters,however we still want simulation that is more believable than random behavior.We describe an algorithm that generates behavior for background characters involved in conversation that supports dynamic changes to conversation group structure.We present an evaluation of this algorithm and make suggestions on how to further improve believability of the simulation.1IntroductionWhen we are dealing with virtual environments with a large number of virtual characters we encounter the problem when it is no longer feasible to simulate each character as a fully animated conversational agent.It is acceptable and desirable to provide main characters with speech recognition,speech synthesis,high-fidelity gestures and lipsynch,analysis of input and an AI agent capable of making informed decisions.On the other hand we would have to spend too many resources to support this for many characters.While we can ignore characters that are too far away from action,we need at least some form of scripting to control the behavior of background characters in view,to maintain the illusion [6].Such scripting in form of hand animating all motions is labor intensive and,if the simulation goes on for longer than the amount of hand-animated material,usually provides repetitive behavior which detracts from realism.One solution to this problem is use of simulation algo-rithms to generate dynamic behavior for background characters.In our case [2]we were mainly interested in behavior of agents involved in conversation.While[8]bases its multimodal conversation model on information structure,a model based on visual perception of the scene rather than on speech is more appropri-ate for our domain.Therefore we decided to use the algorithm [1]proposed by Padilha and Carletta as a starting point for our simulation.We have extended the work in [2],adapting to characters in the unreal tour-nament game engine,and allowing more dynamic starting,ending,and joining of conversation flow.One of the limitations of the simulation algorithms in [1]and [2]was the fact that it only supported one dialog going on at a time,mean-ing that all characters participated in the same conversation.While we could run multiple conversation simulations and explicitly assign different characters to different conversations,this is still not realistic for many situations in which characters move around and join or leave conversations.Likewise,even when T.Panayiotopoulos et al.(Eds.):IV A 2005,LN 3661,pp.65–74,2005.cSpringer-Verlag Berlin Heidelberg 2005I A66 D.Jan and D.R.Traumpeople stay in the same position(e.g.,at a meal or meeting),there are often dynamic splits and realignments into sub-conversations.Adapting a simulation that can handle dynamic creation and entry to conversations will allow more realism as well as scaling to situations with larger numbers of characters than would be supported by a single conversation.2BackgroundSince the conversation simulation is meant for background characters,who are too far away from the main action to hear the content,we focus on the ap-pearance of conversation and the patterns of interaction,rather than actual information exchange or communication of internal state.To achieve realistic behavior we use behavior observed in real human conversations,as synthesized in[1].Participants in conversation take turns at talk.During the turn they mon-itor others to see if the others follow the conversations and to react to feedback given by other participants.When the speaker is speaking there are natural points where others can begin their turn.These are called transition relevance points(TRPs).If the speaker addresses a particular participant with a question then that person will usually take a turn at the TRP.On the other hand if the speaker leaves a free TRP anyone can select to speak or the speaker may choose to continue to talk.At a free TRP we can have more than one participant deciding to start to talk. In such cases we may have overlapped speech and there are various factors that influence who keeps speaking.Another case that involves simultaneous speech are interruptions.These can have several outcomes.The interrupter may stop after a false start,the original speaker may be cut offor the original speaker could decide to ignore the interrupter if he perceives the interruption as side talk and is not bothered by it.Most transitions however will happen at TRPs with only a small gap or no gap at all.This is possible since the participants can anticipate the time TRP will occur based on speech characteristics and also other non-verbal behavior. Since we do not generate actual content of conversation speakers have to provide explicit pre-TRP cues to give participants the level of information required to behave realistically such as changing postures and similar non-verbal behavior that indicates the intention of taking the turn at the next TRP.3Aspects of Conversational SimulationIn our test scenario we connected our algorithm to virtual characters within the Unreal Tournament game engine.These characters had a small set of animations available to indicate different modalities of conversations we were simulating. These animations could be triggered by calling Unreal Tournament commands from an external character controller.Besides the outputs that trigger anima-tions we also have messages between characters(such as TRP signals,selectionDialog Simulation for Background Characters67 speech–begin speaking–end speaking–pre-TRP signal–TRP signal–selection of addressee–positive or negative feedbacknon-verbal–nodding–gestures–posture shifts–gazeFig.1.Conversation Agent Message typesof addressee)that do not result in any direct visible outcome in the simulation. Message types are shown in Figure1.The implementation in[2]used a blackboard where all participants of the conversation would exchange their messages and also had afixed conversation cycle synchronized between all participants.We found this setting limiting in making the algorithm suitable for large number of agents with several ongoing conversations so we implemented a distributed solution in which each character implements its own decisions independently from other characters.To facilitate this we have each character controller running in a separate thread,communi-cating with other characters using messages.When a character receives a new message it can react to it immediately or just update its internal state and make a decision during normally scheduled processing.In the algorithms in[1]and[2]every character was in conversation all the time.Our extensions,however,allow situations when a character is not involved in a conversation at all.From this arises the need to have some higher order planning involved which decides when the character should join an existing con-versation,when it should start a new conversation and also when to leave con-versation because of the reasons external to the dialog simulation itself.In a real virtual environment simulation this would also include planning for walking around and performing other activities,but in this simple scenario we started with conversation activities only.Behavior of characters is controlled by a set of properties in a probabilistic manner as in the previous algorithms.Each of these properties has a value from 0to1.Whenever one of these properties is tested,a random number is selected and compared to the property value(possibly scaled based on contingent factors of the conversation).The properties currently used are shown in Figure2.Each character also keeps track of information about other characters.Each character tracks the gaze of each other,and whether they are speaking,and how long since that character has interacted in the conversation group of the tracker.Characters also track the composition of their conversation group—conversation groups are not defined externally but interpreted on the basis of perceived actions.Characters can also mis-interpret the actions of others,and68 D.Jan and D.R.Traumtalkativeness likelihood of wanting to talktransparency likelihood of producing explicit positive and negative feedback,and turn-claiming signalsconfidence likelihood of interrupting and continuing to speak during simultane-ous talkinteractivity the mean length of turn segments between TRPsverbosity likelihood of continuing the turn after a TRP at which no one is self selectedFig.2.Conversational Agent Propertiescan have different ideas about the composition of a conversation group.In future work,we will use more realistic approaches to perception(e.g.,[7]),so that agents will only observe gaze and speech within their focus of attention.4Conversational Participation AlgorithmEach character runs a separate instance of the algorithm in its own thread, with its own setting for the attributes,and its own internal representation of the behaviors of others and group composition.The algorithm mainly con-sists of a series of event handlers.We briefly describe the major events and behaviors.4.1High-Level PlanningThis part of the code is external to the main conversation algorithm.It represents the high order planning of the character and in our case makes characters join or leave conversation.every planning cycle(approx.every5sec)if in conversationtest to leave conversationelse if talkativeness test successfuldecide to join existing conversationor start a new conversation4.2Claiming a TurnCharacters decide(using the talkativeness parameter)whether or not to take a turn when they receive pre-TRP signal.If they decide they will speak,they will also decide(using the transparency parameter)whether to signal their intention to speak with turn claiming signals if appropriate.when receiving pre-TRP signaltest talkativeness to decide to speakif so,test transparency to make turn claiming signalDialog Simulation for Background Characters694.3Starting to SpeakWhenever the character starts to speak it determines the timing of its turn, including when to send a pre-TRP signal.when starting to speakif at TRP and someone already started speakingtest confidence to continue speakingselect segment length based on interactivity4.4Continuing SpeakingSometimes when onefinishes a segment,no one else takes over.In this case the agent has the option to continue his own speech beyond what was initially planned.when you end segment and no one takes turntest verbosity to continue speaking4.5Tracking Others ParticipationWhenever an agent speaks or gives feedback to someone in a conversation group, they will be an active participant as well.This section maintains the conversa-tional group and activity of its members.when receiving input from other charactersif they are signalling to someone in my groupthen add them to group(if not already there) if they are in my group and addressing someone in my group update last time they were active4.6Responding to OthersThis section calculates how an agent should respond to the initiation of speech by another.Reaction will depend on whether the agent is also speaking and who startedfirst,whether the agent is part of the same conversation as the speaker,and parameters of confidence(whether to continue speaking or not), talkativeness(whether to join a conversation),and transparency(whether to show feedback behavior).Decisions about leaving one conversation for another are also made if a character is addressed by someone who is not in the same conversation.when someone starts to speakif in conversation with meif at TRP and I already started speakingtest confidence to continue speakingif not speakingtest transparency to gaze at speakerif I am not in conversation and they are speaking to me test talkativeness to join conversationtest transparency to give signals of joining70 D.Jan and D.R.Traum4.7Main LoopBelow is the main loop that agents go through,as modified by the above events. every conversation cycle(approx.every0.5sec)remove characters that were inactive for too longif no one is speakingtest talkativeness to start to speakif so,start with random intervalselect addresseetest transparency to shift postureif no one was speaking for some timeif talkativeness test fails leave conversation if listening to someoneif there is more than one speaker for some timegroup was split into two or more conversationskeep speaker that I am listening toremove participants that are attending to others test talkativeness and confidence to interrupt if speaking simultaneouslyif there is only one additional speakerand their addressee attends to themthen treat this as a side talkremove both from conversationotherwise test confidence to continue speaking if speaking alone in a turndecide when to gesture and gaze awayif no one is paying attention to meif confidence test fails stop speaking5EvaluationThere are many possible ways to evaluate the simulation.One can try tofit the model to observed conversations,as suggested by[1].One could also test the differences in simulation that would result from different sets of characters with different sets of parameter values,e.g.,whether it leads to domination of the conversation by a single character or small set of characters.As suggested in[2], we decided to test if the simulation”looks like a conversation”to the viewer.In our test scenario we used for our characters6Iraqi civilians that initially are not involved in conversation.We recorded several simulations with different character attributes and stored videos and internal logs of each agent to later analyze and compare their internal states with responses from the viewers.A snapshot from a conversation simulation is shown in Figure3.We balanced selec-tion of attributes with the physical bodies to control for surface characteristics of the bodies and the effect of positioning.We also made one simulation where characters decided randomly when to start speaking and who to gaze to in order to have a baseline for comparison with our algorithm.Dialog Simulation for Background Characters71Fig.3.Iraqi civilians engaged in conversationWe created3different tests for the viewers.In thefirst part they were asked to view several30second clips of simulations and decide how believable they think each simulation was on a7-point Likert scale.We also asked them to pro-vide any information about what factors they thought made the conversation less believable.In the instructions we also made clear to viewers that when judging believability of the simulation they were to pay most attention the appropriate-ness of behavior,particularly gaze and dialogue rather than animation quality of the characters.In the second part we asked viewers to view multiple2minute clips of sim-ulations.We instructed them to pay attention to only one of the characters (different characters for different clips)and analyze their behavior.Since the attributes used in the algorithm are not all very visible in such a short dia-log we decided to ask viewers about the perceived properties of the characters rather than about underlying attributes.We asked viewers to judge the following properties on scale from1to7:talkative how often is he talking:1–almost never talks4–talks about as much as everyone else7–talks almost all the time72 D.Jan and D.R.Traumpredictive does he give any signals before speaking:1–never gives any hints that he is about to speak7–always indicates that he wants to speaktransparent is he giving any signals that he is attending to the speaker: 1–seems oblivious to others7–always signals understanding of othersinterruptive is he interrupting when others are speaking:1–always waits for others tofinish7–jumps into conversation all the timeconfident is he likely to keep talking if others speak at the same time: 1–gives up his turn if someone else starts to speak,7–never shuts up when others speakHow talkative a character is is influenced by talkativeness attribute,predic-tive and transparent are both influenced by transparency.Confident characters have high confidence attribute and interruptiveness is determined by combina-tion of both talkativeness and confidence.We have not asked about verbosity or interactivity because that would require observation of longer segments to get significant results.In the last part we asked viewers to track who they think is speaking with whom,again for clips of2minutes in length.We used this data to compare how the internal state of each character correlates to what is perceived by the viewer. 6Results and Future WorkEight people of various ages and cultural background anonymously participated in our web-based evaluation.The average believability score for our algorithm was5.3compared to score of3.3for random behavior.The difference is statis-tically significant which indicates that most viewers were able to identify the random behavior.We found that the highest scores were received by simulations where either all characters participate in the same conversation or where the con-versation groups correspond to positioning of the characters in the setting.Since our algorithm does not take positioning of characters into effect when deciding about creating new conversations and allowing conversations to split it is not able to prevent this kind of undesirable behavior from happening.We propose to make modifications to the algorithm that will take positioning into account and will also control character movement to achieve positioning where characters in the same conversation group separate themselves from other characters.We plan to achieve this by tracking noise level for each character.Each speaking character that is speaking,but not in the conversation group of this character, would contribute to the noise level based on their distance.If the noise level would get too high characters would either decide to break their conversations or move away from characters that bother them in their conversation.Part2proved to be a lot more difficult than we expected.Not only were there differences between the values predicted by underlying attributes and re-sults from viewers,but also the values varied widely between viewers.This wouldDialog Simulation for Background Characters73 suggest that it is hard for humans to judge what the personality of a virtual char-acter is,probably because of the lack of expressiveness when we compare virtual characters to real humans.We guess that it would be hard to grasp the per-sonality of a background character anyway.However,we still think that having parameterized algorithm has its benefits since the structure of dialog changes with different attribute settings.Since it is hard to evaluate personality of a single character we propose to evaluate how different personality compositions influence believability of simulation.Results from part3showed that what viewers perceived roughly agreed with the internal state of the characters.When a certain group composition was held for a longer time most of the characters and viewers agreed with what the current group composition was.Most of them correctly differentiated between normal transitions,interruptions and side conversations.However when the side conver-sations do not last long the results vary between characters and also between viewers.We have not yet tested the algorithm with large numbers of virtual charac-ters,but as Ulicny reports in[9]the limiting part in large scale crowd simulations is usually in rendering and not in the behavior generation.From our work so far we can see that it is beneficial to dynamically create behavior for back-ground characters as it both removes labor intensive work of creating scripts and also improves believability of the simulations.However,we have seen from the evaluation results that we have a lot of room for improvements,especially in incorporating character movement in the simulations. AcknowledgementsWe would like to thank Patrick Kenny,Richard Almodovar,and Kurosh Valene-jad for help with unreal tournament animations.We would also like to thank the anonymous reviewers for helpful comments on this paper.The project de-scribed here has been sponsored by the U.S.Army Research,Development,and Engineering Command(RDECOM).Statements and opinions expressed do not necessarily reflect the position or the policy of the United States Government, and no official endorsement should be inferred.References1.Padilha,E.,Carletta,J.:A simulation of small group discussion.Proceedings ofEDILOG2002:Sixth Workshop on the Semantics and Pragmatics of Dialogue.(2002)117–1242.Patel,J.,Parker,R.,Traum,D.R.:Simulation of Small Group Discussions for MiddleLevel of Detail Crowds.Army Science Conference(Orlando,November2004)3.Padilha,E.,Carletta,J.:Nonverbal behaviours improving a simulation of smallgroup discussion.Proc.1st Nordic Symp.on Multimodal Comm.(2003)93–1054.O’Sullivan,C.,Cassell,J.,Vilhjalmsson,H.,Dingliana,J.,Dobbyn,S.,McNamee,B.,Peters,C.,Giang,T.:Levels of detail for crowds and puter GraphicsForum.21(4)200274 D.Jan and D.R.Traum5.Rickel,J.,Marsella,S.,Gratch,J.,Hill,R.,Traum,D.,Swartout,W.:Toward a newgeneration of virtual humans for interactive experiences.IEEE Intelligent Systems.17(2002)6.Swartout,W.,Hill,R.,Gratch,J.,Johnson,W.L.,Kyriakakis,C.,Labore,K.,Lind-heim,R.,Marsella,S.,Miraglia,D.,Moore,B.,Morie,J.,Rickel,J.,Thiebaux, M.,Tuch,L.,Whitney,R.,Douglas,J.:Toward the holodeck:Integrating graphics, sound,character and story.Proceedings of5th International Conference on Au-tonomous Agents.(2001)7.Hill,R.Perceptual Attention in Virtual Humans:Toward Realistic and BelievableGaze Behaviors.In Proceedings of the AAAI Fall Symposium on Simulating Human Agents,pp.46-52,AAAI Press,Menlo Park,Calif.,2000.8.Cassell,J.,Torres,O.,Prevost,S.:Turn taking vs.Discourse Structure:How Bestto Model Multimodal Conversation9.Ulicny,B.,Thalmann,D.:Crowd simulation for interactive virtual environmentsand VR training systems。

相关文档
最新文档