文档视界 最新最全的文档下载
当前位置:文档视界 › Lab3 - 3 phase induction motor_PE3

Lab3 - 3 phase induction motor_PE3

Lab3 - 3 phase induction motor_PE3
Lab3 - 3 phase induction motor_PE3

University of Glasgow

School of Engineering

Power Engineering 3

Lab 3 - 3-Phase Induction Motor

Student Name………………………………………

Matric No…………………………………………..

Introduction

In this experiment you will study the performance a squirrel-cage 3-phase induction motor. These motors are very important for many applications and absorb round about 45 % of all energy generated. They come in many sizes, from only a few watts up to several megawatts, and in many shapes, they can have the rotor rotating around the stator and different methods of cooling (e.g., TEFC –totally enclosed fan cooled, IP 55 (ingress protection, outdoor use) is very common, large machines can be water or oil cooled, drip-proof machines (IP 20, indoor use only) will have an internal fan and venting for air inlet and outlet and a fully submersible motor will be IP 68).

The 4 pole machine you are using is a total enclosed machine with natural convection cooling. It is low voltage (an educational machine designed to work at less that 50 V line to line) however it can be connected in various ways in a similar way to a normal 3-phase motors working at higher voltages.

We will look at the performance of the machine and carry out the following tests and measurements:

?Direction test

?No load test

?Locked rotor test

?Calculation of equivalent circuit parameters

?Obtains torque/speed and current Speed curves from equivalent circuit parameters

?Load test

Assessment

The 3 laboratory sessions account for 15% of your final mark in Power Engineering 3. You should have with you a bound laboratory book (with graph paper). Record ALL your measured results and any subsequent calculations in your bound laboratory book during the laboratory session, also fill out the necessary results in this lab sheet (this makes it easy for me to check your results during the session). At some point after the lab session you need to write up the results (neatly!) and complete the associated analysis/theory sections before handing in your lab books before the end of the semester.

Note that you will not be assessed during the laboratory session so please communicate freely with supervisor/demonstrators –we are here to help you obtain accurate results and to help with any questions you have relating to the associated theory.

Equipment

Warning –please get your connections checked by a demonstrator when first switching on and if in doubt. Take care when using the machinery – it is low power and low voltage but a nasty accident can still occur if you get things caught in it. Long hair should be tied back, ties should be removed or tucked away and objects such as fingers or pens should not be put into the rotating machinery.

Look at the list of equipment in Table 1. The main piece of equipment is the induction motor and eddy current brake. The motor is on the right hand side and the eddy current brake is on the left. The eddy current brake is solely for loading the machine and is simply controlled from the Eddy Current Brake Controller (Module D55-4) connected to it – increase the voltage and the load will increase. Now look at the 3-phase induction motor. At the non-drive end you will find a connection panel with six terminals. Ignore the thermistor connection and study the six terminals. These are labelled A-X, B-Y, and C - Z which represent the three different phase windings. These can be connected in two different ways –in either star or delta. In our experiments, the three phase windings are connected in delta connection as shown in Figure 1.

Table 1 Equipment List

B Y

X

A

Z

C

Figure 1. Delta Connection

Inspect the plate on the induction motor. Rating plates are very important so never remove because it is then difficult to identify what the machine actually is!

Write down the details on the plate below:

Answer these questions:

1. Calculate the Synchronous Frequency using the following equation:

N sync = 120 × supply frequency f s ÷ pole number P .

2. Given that Mechanical Power = Torque × ω (where ω is the speed in rad/sec ) – and assuming the speed is close to the synchron ous speed and convert to rad/sec (multiply by 2π/60). Calculate the rated torque:

In reality the rated torque will be a bit higher than this because the motor will run at a speed a little below the synchronous speed.

Direction Test

The 3-phase supply sets up a rotating magnetic field inside the machine and the direction is dictated by the phase sequence. To make the motor rotate in the opposite direction it is a simple matter to change two phases round (which reverses the phase sequence). In addition we wish to run the motor as lightly loaded as possible so we want to mechanically disconnect the eddy-current brake.

Figure 2. Experimental Setup

Procedure

?The experimental setup for this experiment is shown on Figure 2.

?Set the AC power supply output voltage to zero (voltage adjust knob should be turned fully counter-clockwise until it hits the end-stop).

?Set the Given Eddy Current Load (on the Module D55-4) to zero (the load adjust knob should be turned fully counter-clockwise until it hits the end-stop), and set the Sudden Load Switch to ‘OFF’. Connect the motor up as a Delta connection; check the connection with a demonstrator.

?Adjust the AC power supply output line voltage to the motor to 220V

Note the direction. Now verify that the motor will rotate in the opposite direction by stopping the machine, turning off the supply, and reconnecting with two phases switched. Restart and observe the rotation.

For the rest of the experiment we will keep the motor running in the same direction and in Delta connection. For uniformity keep the motor connected so that it runs in the clockwise direction as you look from the drive end of the machine. Switch off and reconnect if necessary.

No Load Test

We will now do a no load test. This is a simple test were we measure the input voltage, current, power and reactive power or power factor when the motor is running light. Therefore, start the motor and measure these parameters.

Theory and Calculation

The induction motor essentially works as a transformer. The primary is the stator and the secondary is the aluminium cage on the rotor. At the synchronous speed the rotor is rotating at the same speed as the magnetic field set up by the stator current and therefore no current is induced into the rotor. As the rotor slows emfs are induced into the rotor cage, producing rotor current; interaction between the stator magnetic field and the rotor current will produce torque. Therefore we term the difference between the synchronous speed and the rotor speed as the slip which is given by

slip sync r

sync

N N s N -= (1)

At standstill the slip is 1 and at synchronous speed the slip is 0. We can predict the performance of the machine by use of a per-phase equivalent circuit as shown below.

Since it is per-phase it should be excited by the line voltage. For a balanced delta connection system the phase voltage and current are

A simple approximation of the equivalent circuit is to move the magnetizing components to the terminals. This is because the magnetizing components have impedances which are much larger than the resistance and leakage reactances of the stator and rotor. This gives a circuit which looks like

In the open circuit test s is approximately zero so that the rotor circuit is blocked. Therefore the equivalent circuit will be simplified to:

This test should be conducted at rated voltage. From the measurements calculate the values for Rc and Xm . Remember that power is absorbed by the resistor in the circuit. Reactive power may be a new concept to you. The points to bear in mind is that reactive power is absorbed by an inductor (and generated by a capacitor) and that

()2

L 3Total absorbed inductor reactive power Q VAr ph M

V X =

()2

L 3Total real power P W ph C

V R =

The circuit is per-phase so that to get the total power or reactive power then multiply the per-phase values by three. The unit of reactive power is Volt-Amp reaction (VAr).

We now have two values in the per-phase equivalent circuit.

4. Locked Rotor Test.

This test is to obtain the other values in the equivalent circuit.

Procedure

Ensure that the motor is switched off. First push the eddy current brake back onto the induction motor and get this checked by a demonstrator. There is a slider on the eddy current brake at the shaft end that can be used to lock the rotor so slide this across and ensure that the shaft is locked to the brake.

The locked rotor test should be conducted as close to rated current I N as possible. The rated phase current is I N which for a delta connected load. At zero speed full voltage will lead to very high current so this test is performed at reduced voltage (slowly adjusting the knob to increase the

voltage from zero until U W N I I ==). Get the circuit checked before switching on.

Switch on the system and quickly measure the input parameters then switch off after few seconds:

Also measure the torque on the dial at the end of the eddy current brake. Remember that there is a calibration factor as indicated on the brake.

The starting torque is approximately proportional to the square of the applied voltage so calculate the starting torque at full voltage (see Appendix 1). The starting current is approximately proportional to the applied voltage so calculate the starting current at full voltage (see Appendix 1).

We will use this later. We now wish to obtain the input resistance of the machine so disconnect the supply and measure the resistance of one phase using a multimeter :

Theory and Calculation

In the equivalent circuit, when the slip is 1 (i.e., at start) then rotor circuit has a much lower impedance than the magnetizing circuit so that, at start, it approximates to

Therefore the values of X1 + X2’ can be obtained from the input reactive power and current and R1 + R2’ can be obtained from the input power and current.

()()2

L 12Total real power P 3+ ' W Line I R R =

()()2

L 12Total absorbed inductor reactive power Q 3+ ' VAr Line I X X =

Note: We can separate the R1 and R2’ using the stator phase resistance measured earlier.

We have now obtained all the circuit parameters for the induction motor. Remove the in-line resistances from the circuit.

5. Load tests

Now load the machine by applying various given load level to the Eddy Current Brake.

Fill in the table below with about three points equally spread in terms of torque from the full load current (rated speed) down to near zero current (near synchronous speed)

#1 –these values are measured and the other values are subsequently calculated from the measured results

D G Dorrell

Jan 2005

Appendix 1

Estimation of Starting Torque at Full Supply Voltage:

2

SF FV

RV SR V T T V ??= ???

Where:

T FV = Starting Torque at Full Supply Voltage

T RV = Starting Torque at Reduced Supply Voltage V SF = Full Supply Voltage

V SR = Reduced Supply Voltage

Estimation of Starting Current at Full Supply Voltage:

SF FV

RV SR V I I V ??= ???

Where:

I FV = Starting Current at Full Supply Voltage

I RV = Starting Current at Reduced Supply Voltage V SF = Full Supply Voltage

V SR = Reduced Supply Voltage

3乐高实验指导书.docx

机电一体化创新综合实验

第一部分课程总览 第二部分综合实验 Labi光电传感器自动跟踪小车 Lab2光电传感器测距功能测试 Lab3光电传感器位移传感应用 Lab4超声波传感器测试 Lab5超声波传感器位移传感应用 第三部分创新实验 双轮自平衡机器人; 碰触传感机器人设计(Microsoft Robotics Studio平台);寻线机 器人的仿真和建模及实例(基于Lejos-Osek设计一个机器人的实例); 自己提出一个合理的项目 第一部分 课程总览 一、目的与意义 提倡“素质教育”、全面培养和提高学生的创新以及综合设计能力是当前高等工科院校实验教学改革的主要目标之一。为适应素质教育的要求,高等工科院校的实验课程正经历着从“单一型” “验证型”向“设计型”“开放型”的变革过程。我院测试及控制类课程《电工电子技术》《测试技术》《微机原理及接口技术》等课程涵盖了机械设备及加工过程测试控制相关的电子电路、传感器、信号处理、接口、控制原理、测控计算机软件等理论及技术,具有综合性、实践性强的特点,

但目前各课程的实验教学存在着孤立、分散、缺乏系统性的问题。为促进机械工程学科学生对于计算机测控技术的工程创新设计能力、促进相关理论知识的理解和灵活应用,本机电一体化创新综合实验以丹麦乐高(LEGO )公司教育部开发的积木式教学组件一智力风暴(MINDSTORMS)为基础进行。 采川LEGO MINDSTORMS为基础建立开放型创新实验室,并根据我院测试及控制类课程《电工电子技术》《测试技术》《微机原理及接口技术》等课程设计多层次的综合创新实验设计项目,具有技术综合性和趣味性以及挑战性,能有效激发学生的学习兴趣,使学生在实践项目的过程中激发和强化他们的创造力、动手能力、协作能力、综合能力和进取精神;可使学生在实施项目的过程中对材料、机械、电子、计算机硬件、软件均有直观的认知并掌握机械工程测试与控制的综合分析设计能力。 二、实验基础 2.1 LEGO MINDSTORMS 控制器硬件 要求认识和理解RCX、NXT的基本结构,输入输出设备及接口,DCP传感器及接口,并熟练进行连接与操作。 2.2根据具体的实验要求选择适合的软件 Microsoft Robotics Studio 基础 VPL编程 Microsoft Robotics Studio 软件 Robolab 软件 NXT软件 Mat lab等等 2.3授课方式: 课堂讲授,编程以自学为主

清华大学操作系统课程lab2实验报告

物理内存管理实验报告 练习0:合并lab1和lab2 书上提示使用“diff/merge”工具来合并lab1和lab2的代码,可是没有找到这款工具,但是被推荐使用meld工具,也能很方便地将不同目录的文件异同比较出来,可以一一手动合并,删除,增加代码,避免了不必要的错误。 这部分主要合并的文件有kdebug.c、trap.c。 练习1:实现firstfit连续物理内存分配算法。 完成合并代码的工作之后,make qemu执行lab2,结果出现错误提示:

提示default_pmm.c的第283行出现错误,打开文件看,发现这句话出现在函数static void default_check(void) 中,这是一个检查函数,并且提示不要修改。 当然,为了调试工作,在检查函数中加一些代码还是可以的。例如通过cprintf输出一些调试信息,除此之外,还发现check函数中使用大量assert函数,大概作用是当参数条件不为1的时候就弹出debug minitor。也可以用来调试作用。 起初,我仔细看了basic_check函数,它的作用只是做了一些简单的分配释放的操作,并且也没出错,后面看了default_check函数之后也没找到问题所在。再然后是重点分析default_alloc_pages和default_free_pages函数,结合list_add函数看了许久才发现它的空闲块插入顺序有问题:每次插入都是从free_list的头部插入,事实上,应该保持free_list 的顺序,地址小的空闲块应该放在前面,地址大的空闲块应该放在后面,以便firstfit算法的从头快速查找。 找到问题后大致明白了这个exercise的目标:这个练习主要就是完善 default_alloc_pages和default_free_pages。 关键变量: #define free_list (free_area.free_list)//空闲块的链表,但是不指向具体页 #define nr_free (free_area.nr_free)//空闲块的个数 关键函数: list_init(&free_list);//初始化空闲块链表 SetPageProperty(base); ClearPageProperty(base); 关键宏: le2page(le, page_link);//由链表指针得到对应页的地址 (一)Alloc pages:用firstfit算法寻找空闲块 list_entry_t *le = &free_list; while ((le = list_next(le)) != &free_list) { struct Page *p = le2page(le, page_link);

操作系统-ucore-lab3

操作系统实验报告 题目:虚拟内存管理

目录 一、内容 (2) 二、目的 (3) 三、实验流程 (3) 四、实验环境与结果分析 (3) 五、实验体会和思考题 (10)

一、内容 本次实验是在实验二的基础上,借助于页表机制和实验一中涉及的中断异常处理机制,完成Page Fault异常处理和FIFO页替换算法的实现,结合磁盘提供的缓存空间,从而能够支持虚存管理,提供一个比实际物理内存空间“更大”的虚拟内存空间给系统使用。这个实验与实际操作系统中的实现比较起来要简单,不过需要了解实验一和实验二的具体实现。实际操作系统系统中的虚拟内存管理设计与实现是相当复杂的,涉及到与进程管理系统、文件系统等的交叉访问。如果大家有余力,可以尝试完成扩展练习,实现extended clock页替换算法。 练习1:给未被映射的地址映射上物理页(需要编程) 完成do_pgfault(mm/vmm.c)函数,给未被映射的地址映射上物理页。设置访问权限的时候需要参考页面所在VMA的权限,同时需要注意映射物理页时需要操作内存控制结构所指定的页表,而不是内核的页表。注意:在LAB2EXERCISE1处填写代码。执行make qemu后,如果通过check_pgfault函数的测试后,会有“check_pgfault() succeeded!”的输出,表示练习1基本正确。 请在实验报告中简要说明你的设计实现过程。请回答如下问题: 请描述页目录项(Pag Director Entry)和页表(Page Table Entry)中组成部分对ucore实现页替换算法的潜在用处。 如果ucore的缺页服务例程在执行过程中访问内存,出现了页访问异常,请问硬件要做哪些事情? 练习2:补充完成基于FIFO的页面替换算法(需要编程) 完成vmm.c中的do_pgfault函数,并且在实现FIFO算法的swap_fifo.c中完成map_swappable和swap_out_vistim函数。通过对swap的测试。注意:在LAB2EXERCISE 2处填写代码。执行 make qemu 后,如果通过check_swap函数的测试后,会有“check_swap()succeeded!”的输出,表示练习2基本正确。 请在实验报告中简要说明你的设计实现过程。 请在实验报告中回答如下问题: 如果要在ucore上实现"extended c lock页替换算法"请给你的设计方案,现有的swap_manager框架是否足以支持在ucore 中实现此算法?如果是,请给你的设计方案。如果不是,请给出你的新的扩展和基此扩展的设计方案。并需要回答如下问题需要被换出的页的特征是什么?在ucore中如何判断具有这样特征的页?何时进行换入和换出操作?

控制工程基础实验——Mat lab仿真实验报告

实验一:Mat lab 仿真实验 1.1直流电机的阶跃响应。 给直流电机一个阶跃,直流电机的传递函数如下: ) 1101)(11.0(50 )(4 +?+=-s s s G 画出阶跃响应如下: Step Response Time (sec) A m p l i t u d e 零极点分布: P ole-Zero Map Real Axis I m a g i n a r y A x i s

分析:直流电机的传递函数方框图如下: 所以传递函数可以写成: 1 /1)() (2++= s T s T T C s U s n m a m E a 式中,R L T C C JR T a E M m ==,分别为电动机的机电时间常数与电磁时间常数。一般相差不大。 而试验中的传递函数中,二者相差太大,以至于低频时: 低频时) (1 1.050 ) 1101)(11.0(50 )(4+≈ +?+= -s s s s G 所以对阶跃的响应近似为: )1(50)(1.00t e t x --=

1.2 直流电机的速度闭环控制 如图1-2,用测速发电机检测直流电机转速,用控制器Gc(s)控制加到电机电枢上的电压。 1.2.1 假设G c(s)=100,用matlab 画出控制系统开环Bode 图,计算增益剪切频率、相位裕量、相位剪切频率、增益裕量。 M a g n i t u d e (d B )10 10 10 10 10 10 10 10 P h a s e (d e g ) Bode Diagram Frequency (rad/sec) 幅值裕量Gm =11.1214 相位裕量Pm = 48.1370

单片机实验报告

院系:计算机科学学院专业:智能科学与技术年级: 2012 学号:2012213865 姓名:冉靖 指导教师:王文涛 2014年 6月1日

一. 以下是端口的各个寄存器的使用方式: 1.方向寄存器:PxDIR:Bit=1,输出模式;Bit=0,输入模式。 2.输入寄存器:PxIN,Bit=1,输入高电平;Bit=0,输入低电平。 3.输出寄存器:PxOUT,Bit=1,输出高电平;Bit=0,输出低电平。 4.上下拉电阻使能寄存器:PxREN,Bit=1,使能;Bit=0,禁用。 5.功能选择寄存器:PxSEL,Bit=0,选择为I/O端口;Bit=1,选择为外设功能。6.驱动强度寄存器:PxDS,Bit=0,低驱动强度;Bit=1,高驱动强度。 7.中断使能寄存器:PxIE,Bit=1,允许中断;Bit=0,禁止中断。 8.中断触发沿寄存器:PxIES,Bit=1,下降沿置位,Bit=0:上升沿置位。 9.中断标志寄存器:PxIFG,Bit=0:没有中断请求;Bit=1:有中断请求。 二.实验相关电路图: 1 MSP430F6638 P4 口功能框图: 主板上右下角S1~S5按键与MSP430F6638 P4.0~P4.4口连接: 2按键模块原理图: 我们需要设置两个相关的寄存器:P4OUT和P4DIR。其中P4DIR为方向寄存器,P4OUT 为数据输出寄存器。 主板上右下角LED1~LED5指示灯与MSP430F6638 P4.5~P4.7、P5.7、P8.0连接:

3 LED指示灯模块原理图: P4IN和P4OUT分别是输入数据和输出数据寄存器,PDIR为方向寄存器,P4REN 为使能寄存器: #define P4IN (PBIN_H) /* Port 4 Input */ #define P4OUT (PBOUT_H) /* Port 4 Output */ #define P4DIR(PBDIR_H) /* Port 4 Direction */ #define P4REN (PBREN_H) /* Port 4 Resistor Enable */ 三实验分析 1 编程思路: 关闭看门狗定时器后,对P4.0 的输出方式、输出模式和使能方式初始化,然后进行查询判断,最后对P4.0 的电平高低分别作处理来控制LED 灯。 程序流程图: 2 关键代码分析: #include void main(void) { WDTCTL = WDTPW + WDTHOLD; // 关闭看门狗 P4DIR |= BIT5; // 设置4.5口为输出模式 P4OUT |= BIT0; // 选中P4.0为输出方式 P4REN |= BIT0; // P4.0使能 while (1) // Test P1.4 { if (P4IN & BIT0) //如果P4.0为1则执行,这是查询方式按下去后是低,否则为高

操作系统lab2实验报告

HUNAN UNIVERSITY 操作系统实验报告

目录 一、内容 (3) 二、目的 (3) 三、实验设计思想和练习题 (3) 练习0:填写已有实验 (3) 练习1:实现 first-fit 连续物理内存分配算法(需要编程) (3) 练习2:实现寻找虚拟地址对应的页表项(需要编程) (8) 练习3:释放某虚地址所在的页并取消对应二级页表项的映射(需要编程) (11) 运行结果 (13) 四、实验体会 (13)

一、内容 本次实验包含三个部分。首先了解如何发现系统中的物理内存;然后了解如何建立对物理内存的初步管理,即了解连续物理内存管理;最后了解页表相关的操作,即如何建立页表来实现虚拟内存到物理内存之间的映射,对段页式内存管理机制有一个比较全面的了解。 二、目的 1.理解基于段页式内存地址的转换机制; 2.理解页表的建立和使用方法; 3.理解物理内存的管理方法。 三、实验设计思想和练习题 练习0:填写已有实验 使用eclipse中的diff/merge工具将实验1的代码填入本实验中代码中有“LAB1”的注释相应部分。 练习1:实现 first-fit 连续物理内存分配算法(需要编程) 在实现first fit 内存分配算法的回收函数时,要考虑地址连续的空闲块之间的合并操作。提示:在建立空闲页块链表时,需要按照空闲页块起始地址来排序,形成一个有序的链表。可能会修改default_pmm.c 中的default_init,default_init_memmap,default_alloc_pages, default_free_pages等相关函数。请仔细查看和理解default_pmm.c中的注释。 请在实验报告中简要说明你的设计实现过程。请回答如下问题: 你的first fit算法是否有进一步的改进空间。 解答: 分析思路: (1)数据结构: A.每个物理页利用一个Page结构体表示,查看kern/mm/memlayout.h包括:

lab1汇编语言与DOS系统实验报告

汇编语言与DOS系统实验报告 一、实验目的 1、掌握x86体系段式内存组织方式,了解如何用程序指令访问不同的内存空 间 2、了解DOS系统的基本操作 3、掌握汇编语言的编译和调试方法 二、实验条件 1、DOS操作系统平台 三、实验原理 1、x86实模式下内存采用分段的组织方式,将20位的地址空间分为16位的 段地址和16位的偏移地址,表示为“段地址:偏移地址”的形式,实际物理地址=段地址×16+偏移地址。 2、DOS系统基本操作命令: (1)cd命令进入磁盘或文件夹 (2)dir命令列出目录下的文件 (3)makedir创建目录 (4)del删除文件 (5)copy复制文件 (6)rename文件重命名 3、汇编语言编译命令: (1)edit命令编辑程序

(2)masm生成目标文件 (3)link链接生成可执行文件 (4)输入文件名运行程序 4、程序调试方法 使用debug命令调试程序,常用的调试参数有: (1)-u反汇编生成程序的汇编代码 (2)-d查看内存地址的内容 (3)-p/t单步调试 (4)-g设置断点 (5)-e修改指定地址内容 四、实验内容 1、写出A+B problem的汇编代码,使用编译命令生成可执行文件并使用 debug加载可执行程序。实验代码如下: DATA SEGMENT ADDER1 DB 35H ADDER2 DB 48H SUM DB ? DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA START: MOV AX,DATA

MOV DS,AX MOV AL,ADDER1 ADD AL,ADDER2 MOV SUM,AL MOV AX,4C00H INT 21H CODE ENDS END START 首先将源文件使用masm命令和link命令生成可执行文件,使用debug命令调试程序,使用-u参数显示汇编代码,g命令设置断点到MOV SUM,AL指令处,此时使用d ds:0000即可在内存中显示两个加数以及两个数的和的数值,可以使用-e命令修改参数。 2、增加变量N,实现N个数字的加法运算,实验中N设置为4,实验代码 如下: DATA SEGMENT ADDER1 DB 35H ADDER2 DB 48H ADDER3 DB 20H ADDER4 DB 30H SUM DB ? DATA ENDS

Lab1_体系结构实验报告

2012年3月1日 一、实验目的和要求 1.understand the principles of ALU and master methods of ALU design 2.understand the principles of ALU controller and master methods of ALU controller design 3.understand the principles of register file and master methods of register file design so the task is first, design a ALU with ALU controller then, design a register file 二、实验内容和原理 2.1 ALU with ALU controller We input the operand r, s; both are 32 bit integer, and aluc is the control code that defines the operation. So we just make the code block, totally as ALU block, ALUC block, display block.

Figure 1 the input and output diagram Figure 2 ALU operations Figure 3 the truth table of operation cod e

Figure 4 principle of ALU 2.2 register file The process is similar to the 2.1, when we get the principle of register file , it can be easily coding. Figure 5 the input and output

遥感图像处理 图像配准、图像裁剪 实验报告

Lab3 geometric correction and projection transformation of remotely sensed data Objective : The purpose of the current lab section is to adequately understand the mathematic principles and methods of geometric correction (co-registration) and projection transformation . In addition,you guys need to gain hands-on experience or skill to perform them in ENVI and ERDAS environments. 实验过程: 一、envi中图像配准 1、根据控制点的坐标对图像进行配准 1)加载中山陵地形图 2) 选择map 菜单下的registration菜单,选择select gcps:image to map 设置投影信息:基于经纬度的投影(geographic lat/lon),选择基准面为WGS—84

3)开始配准 依次移动一级窗口中的光标到四个图廓点的位置,在三级放大窗口中把十字司放在经纬线的交点的中间位置,输入该点的经纬度于编辑对话框中:

点击add point,完成对控制点的编辑 4)选择option菜单下的wrap file将配准好的地图生成一幅新的影像

修改生成图像信息,改为50带的UTM投影,基准面为WGS-84,保存 2、图像到图像的配准 1)加载全色波段影像作为待配准的影像

Lab4实验报告

2012 简单的类MIPS 单 周期处理器实现– 寄存器与内存 LAB4实验报告 王红宾5090519061 SJTU | F0905103

1实验概述 1.1实验名称 简单的类MIPS 单周期处理器实现–寄存器与内存 1.2 实验目的 1.理解CPU 的寄存器与内存 1.3实验范围 本次实验将覆盖以下范围 1.ISE的使用 2.Spartan-3E实验板的使用 3.使用Verilog HDL进行逻辑设计 4.Register 的实现 5.Data Memory 的实现 6.有符号扩展的实现 1.4注意事项 1. 本实验的逻辑设计工具为Xilinx ISE11.1。 2实验内容 2.1实验步骤 1.启动ISE 11.1。 2.选择File > New Project… 出现New Project Wizard。 3.Project Name填写lab5,选择工程Project Location,Top-level Source Type选择HDL。点击Next。

4. Device Properties 中各属性填写如下: Product Category: ALL Family: Spartan3E Device: XC3S500E Package: FG320 Speed: -4 Synthesis Tool: XST(VHDL/Verilog) Simulator: ISim(VHDL/Verilog) ,也可用Modelsim仿真。Preferred Language: Verilog 确认Enable Enhanced Design Summary 已勾选

lab3复杂流水线实验报告

Lab3复杂流水化实验 Experiment1: To study the basics of forwarding. For all the programs please select Stall Detection and Forwarding should be ON. (a)Write a sample program that forwards between EXE stage and MEM stage on upper input of the the program below and show forwarding with arrow. Test it on the simulator and mention what value is being forwarded. DO NOT USE LW INSTRUCTION. 其中ADD指令中在MEM阶段的ALUout-555(R2+R3)前递到SUB指令的EXE阶段的upper input。 (b)Write a sample program that forwards between EXE stage and WB stage on upper input of the the program below and show forwarding with arrow. Test it on the simulator and mention what value is being forwarded. DO NOT USE LW INSTRUCTION. 其中ADD指令中在WB阶段的输出555(R2+R3)前递到SUB指令的EXE阶段的upper input。 (c)Write a sample program that forwards between EXE stage and MEM stage on

Bomblab实验报告

课程实验报告 课程名称: 计算机系统原理实验 实验项目名称: BombLab 专业班级: 计科1501 姓名: 马子垚 学号: 2 完成时间: 2017 年 4 月 19 日 实验目的 理解汇编语言,学会使用调试器 实验原理 二进制炸弹就是作为一个目标代码文件提供给学生们的程序,运行时,它提示用户输入6个不同的字符串。如果其中任何一个不正确,炸弹就会“爆炸”:打印出一条错误信息。学生通过反汇编与逆向工程来确定就是哪六个字符串,从而解除她们各自炸弹的雷管。

实验步骤及体会 一、实验准备 1、首先,由于虚拟机操作系统与windows系统相互独立,所以 首先将Bomb、c及其相关文件存至百度云盘,然后在 ubantu操作系统内下载至文件系统目录下的下载文件夹 里面: 2、输入、/bomb试运行bomb、c文件时会提示权限不够: 所以需要输入chmod+x+文件名的命令于改变文件或目录 的访问权限。用它控制文件或目录的访问权限。在经过操 作之后,获得了权限,程序可以正常运行了: 3、由于bomb、c文件并没有蕴含许多能破解的信息,所以需要 将其进行反汇编,详细操作如下: 输入objdump –d bomb >bomb、txt将汇编代码输出到自 动生成一个bomb、txt的文件里面,方便我们查瞧与分析 代码:

二、具体实验步骤及其分析 试查瞧导出的bomb、txt,我发现总的文本里面分为很多段,其中就有Phase_1~Phase_6、Phase_defuse、Phase_secret以及其她相关函数的代码,所以我猜测每一段Phase代码就就是我们需要破解的关卡,所以我将它们分别导出新建text文件,逐段分析。 Phase_1及其破解过程: 知识点:string,函数调用,栈 反汇编代码及其分析: 08048f61 : 8048f61: 55 push %ebp //压栈 ebp为栈指针 esp为栈指针。 push指令可以理解为两个步骤: 1、 subl $4 , %esp –栈底向下移一位 2、 movl %ebp ,(%esp) 将ebp的值存入esp中 8048f62: 89 e5 mov %esp,%ebp //把esp赋值给ebp 8048f64: 83 ec 18 sub $0x18,%esp //esp指针下移0x18个字节 8048f67: c7 44 24 04 5c a1 04 movl $0x804a15c,0x4(%esp) //取0x804a15c处的内容存入*(%esp+4) //前一段总的分析:初始化栈,push就是压栈指令,ebp寄存器中的内容就是栈底指针。esp寄存器里面存的就是栈顶地址。通过sub指令,将栈顶固定在第十八个存储单元里面。字符串的内存地址为0804a15c,四个字节。一个存储单元存放8个bit 两个十六进制数字,栈顶及后三个单元存栈顶地址。故用mov指令将字符串地址存在栈顶后的第四个字节处。 8048f6e: 08 8048f6f: 8b 45 08 mov 0x8(%ebp),%eax //取用户输入的内容存入%ebp 8048f72: 89 04 24 mov %eax,(%esp) //eax的值赋值给*esp

ucore实验3实验报告

LAB3实验报告 实验目的: ●了解虚拟内存的Page Fault异常处理实现 ●了解页替换算法在操作系统中的实现 实验内容: 本次实验是在实验二的基础上,借助于页表机制和实验一中涉及的中断异常处理机制,完成Page F ault异常处理和FIFO页替换算法的实现,结合磁盘提供的缓存空间,从而能够支持虚存管理,提供一个比实际物理内存空间“更大”的虚拟内存空间给系统使用。这个实验与实际操作系统中的实现比较起来要简单,不过需要了解实验一和实验二的具体实现。实际操作系统系统中的虚拟内存管理设计与实现是相当复杂的,涉及到与进程管理系统、文件系统等的交叉访问。如果大家有余力,可以尝试完成扩展练习,实现extended clock页替换算法。 一.练习 练习0:填写已有实验 本实验依赖实验1/2。请把你做的实验1/2的代码填入本实验中代码中有“LAB1”,“LAB2”的注释相应部分。 练习1:给未被映射的地址映射上物理页 完成do_pgfault(mm/vmm.c)函数,给未被映射的地址映射上物理页。设置访问权限的时候需要参考页面所在VMA的权限,同时需要注意映射物理页时需要操作内存控制结构所指定的页表,而不是内核的页表。注意:在LAB2 EXERCISE 1处填写代码。执行 make qemu后,如果通过check_pgfault函数的测试后,会有“check_pgfault() succeeded!”的输出,表示练习1基本正确。 请在实验报告中简要说明你的设计实现过程。请回答如下问题: ●请描述页目录项(Pag Director Entry)和页表(Page Table Entry)中组成部分对 ucore实现页替换算法的潜在用处。 ●如果ucore的缺页服务例程在执行过程中访问内存,出现了页访问异常,请问硬件要做 哪些事情? 问题分析:当启动分页机制以后,如果一条指令或数据的虚拟地址所对应的物理页不在内存中,或者访问权限不够,那么就会产生页错误异常。其具体原因有以下三点: 1.页表项全为0——虚拟地址与物理地址为建立映射关系或已被撤销。 2.物理页面不在内存中——需要进行换页机制。 3.访问权限不够——应当报错。 根据以上三点错误原因,完成页错误处理函数do——pgfault()。 大体思路:do_pgfault()函数从CR2寄存器中获取页错误异常的虚拟地址,根据error code来查找这个虚拟地址是否在某一个VMA的地址范围内,并且具有正确的权限。如果满足上述两个要求,则需要为分配一个物理页。 程序代码: Kern/mm/vmm.c中do_pgfault()函数的EXERCISE 1修改如下: //尝试找到pte, 如果对应的页表项PT不存在则创建一个

Bomb Lab实验报告

课程实验报告 课程名称:计算机系统原理实验 实验名称:Bomb Lab 专业班级: 姓名: 学号: 完成时间:2017.4.19

一、实验目的 熟悉汇编程序,学习gdb调试工具,熟悉并掌握函数调用过程中的栈帧结构的变化。 二、实验环境 个人PC,Linux发行版本,终端,gdb调试工具。 三、实验要求 1.本次实验为熟悉汇编程序及其调试方法的实验。 2.实验内容包含2个文件bomb(可执行文件)和bomb.c(c源文件)。 3.使用gdb工具反汇编出汇编代码,结合c语言文件找到每个关卡的入口函数。 4.分析汇编代码,找到在每个phase程序段中,引导程序跳转到 “explode_bomb”程序段的地方,并分析其成功跳转的条件,以此为突破口寻找应该在命令行输入何种字符通关。 5.本实验一共有7个关卡,包括6个普通关卡和1个隐藏关卡。要求至少通过6个普通关卡。 四、实验内容及操作步骤 (一)准备过程 1.解压文件夹得到“bomb”,“bomb.c”,“README-bomblab.txt”以及“实验基本内容与要求.txt”等文档。查看“实验基本内容与要求.txt”了解实验内容与要求后打开bomb.c文件,编译发现不能通过,代码不完整,所以bomb.c 文件只能用来作为参考。查看bomb.c文件发现控制密码正确的6个函数分别为phase_1,phase_2,phase_3,phase_4,phase_5,phase_6,因此可以对bomb文件反汇编得到汇编文本,结合汇编文本与bomb.c文本进一步分析。 2.进入Ubuntu,将bom和bomb.c文档复制到主文件目录下,ctrl+alt+t打开终端,通过“objdump -d bomb > bomb.s”命令将可执行文件反汇编成bomb.s文件,并且可以通过“gdb -q bomb”进行调试。

面向对象程序设计,实验报告

安徽工业大学 面向对象程序设计实验报告 实验课程:《C++语言程序设计》 学生姓名: 学号: 专业班级: 2011年 12 月 18 日

目录 实验1熟悉C++开发环境及简单程序设计和应用 (3) 实验2基本控制结构程序设计 (6) 实验3 类与对象 (10) 实验4友元函数与友元类 (13) 实验5数组与指针 (16) 实验6静态成员 (20) 实验7类的继承 (22) 实验8多态 (24)

安徽工业大学实验报告 学生姓名:张虹学号:6100409033 专业班级:网络工程091 实验类型:□验证□综合□设计□创新实验日期:实验成绩: 实验1熟悉C++开发环境及简单程序设计和应用 一、实验目的 1.初步了解C++程序的编译、连接和运行的过程。 2.掌握和理解C++程序的结构。 二、实验内容 1.使用VC 2.运行一个简单的C++程序 3.编程求出对任意输入的两个整数,求出该两个整数的最大公约数和最小公倍数 三、实验步骤 1.启动VC 或

2.建立工程并输入以下程序 #include using namespace std; void main() { int i(1), sum(0); do { sum+=i; i++; }while(i<=10); cout<<"sum="<

3.保存文件、运行程序、退出VC程序、打开已经存在的文件 4.编程求出对任意输入的两个整数,求出该两个整数的最大公约数和最小公倍数编写以下代码: #include using namespace std; void main() { int a,b,c,d,i; cout<<"a="; cin>>a; cout<<"b="; cin>>b; for(i=1;i<=a && i<=b;i++) if(a%i==0 && b%i==0) c=i; for(i=a*b;i>=a && i>=b;i--) if(i%a==0 && i%b==0) d=i; cout<<"a和b的最大公约数为"<

Bomb-Lab实验报告

Bomb-Lab实验报告

课程实验报告 课程名称:计算机系统原理实验 实验名称: Bomb Lab 专业班级: 姓名:

学号: 完成时间: 2017.4.19 一、实验目的 熟悉汇编程序,学习gdb调试工具,熟悉并掌握函数调用过程中的栈帧结构的变化。 二、实验环境 个人PC,Linux发行版本,终端,gdb调试工具。 三、实验要求 1.本次实验为熟悉汇编程序及其调试方法的实验。 2.实验内容包含2个文件bomb(可执行文件)和bomb.c(c源文件)。 3.使用gdb工具反汇编出汇编代码,结合c语言文件找到每个关卡的入口函数。 4.分析汇编代码,找到在每个phase程序段中,引导程序跳转到 “explode_bomb”程序段的地方,并分析其成功跳转的条件,以此为突破口寻找应该在命令行输入何种字符通关。 5.本实验一共有7个关卡,包括6个普通关卡和1个隐藏关卡。要求至少通过6个普通关卡。

四、实验内容及操作步骤 (一)准备过程 1.解压文件夹得到“bomb”,“bomb.c”,“README-bomblab.txt”以及“实验基本内容与要求.txt”等文档。查看“实验基本内容与要求.txt”了解实验内容与要求后打开bomb.c文件,编译发现不能通过,代码不完整,所以bomb.c 文件只能用来作为参考。查看bomb.c文件发现控制密码正确的6个函数分别为phase_1,phase_2,phase_3,phase_4,phase_5,phase_6,因此可以对bomb文件反汇编得到汇编文本,结合汇编文本与bomb.c文本进一步分析。 2.进入Ubuntu,将bom和bomb.c文档复制到主文件目录下,ctrl+alt+t打开终端,通过“objdump -d bomb > bomb.s”命令将可执行文件反汇编成bomb.s 文件,并且可以通过“gdb -q bomb”进行调试。 3.将bomb.c复制成文本后打开bomb.c查看汇编代码并进一步分析。 (二)关卡分析 1.phase_1 phase_1汇编代码及注释如下: 08048f61 : 8048f61: 55 push %ebp 8048f62: 89 e5 mov %esp,%ebp 8048f64: 83 ec 18 sub $0x18,%esp #开辟一个24 位的栈空间 8048f67: c7 44 24 04 5c a1 04 movl $0x804a15c,0x4(%esp) # 将0x804a15c存到%eap+4的位置,x/s 0x804a15c 得到 "We have to stand with our North Korean allies." 8048f6e: 08 8048f6f: 8b 45 08 mov 0x8(%ebp),%eax 8048f72: 89 04 24 mov %eax,(%esp) #将%ebp+8处的值存到%esp

C 程序设计实验报告解析

C++实验报告 实验一 1. 实验要求 (1)编写一个函数把华氏温度转换为摄氏温度,转换公式如下 C=(F-32)*5/9 (2)编写重载函数Max1可分别求两个整数,三个整数,两个双精度数,三个双精度数的最大值。 (3)使用系统函数pow(x,y)计算x y的值,注意包含头文件math.h。 (4)用递归的方法编写函数求Fibonacci级数,观察递归调用的过程 2. 实验内容及实验步骤 (1)编写函数float Convert(float TempFer),参数和返回值都为float类型,实现算法C=(F-32)*5/9,在main()函数中实现输入、输出。程序名:lab3_1.cpp。 (2)分别编写四个同名函数max1,实现函数重载,在main()函数中测试函数功能。程序名:lab3_2.cpp (3)在main()函数中提示输入两个整数x、y,使用cin语句得到x、y 的值,调用pow(x,y)函数计算x的y次幂的结果,再显示出来。程序名:lab3_4.cpp (4)编写递归函数int fib(int n),在主程序中输入n的值,调用fib函数计算Fibonacci级数。 公式为fib(n)=fib(n-1)+fib(n-2),n>2; fib(1)=fib(2)=1。 使用if语句判断函数的出口,在程序中用cout语句输出提示信息。程序名:lab3_5.cpp (5)使用debug中的Step Into追踪到函数内部,观察函数的调用过程。3.源程序 Lab3_1 #include using namespace std; float fun(float x) { float y;

清华大学操作系统lab1_实验报告

实验1:系统软件启动过程 练习1: (1)操作系统镜像文件ucore.img 是如何一步一步生成的? 在命令行中输入“make V=” 1、首先把C的源代码进行编译成为.o文件,也就是目标文件(红色方框内) 2、ld命令将这些目标文件转变成可执行文件,比如此处的bootblock.out(绿色方框内) 3、dd命令把bootloder放到ucore.img count的虚拟硬盘之中 4、还生成了两个软件,一个是Bootloader,另一个是kernel。 (2)一个被系统认为是符合规范的硬盘主引导扇区的特征: 在/lab1/tools/sign.c中我们可以了解到 规范的硬盘引导扇区的大小为512字节,硬盘结束标志位55AA

练习2: (1)从CPU 加电后执行的第一条指令开始,单步跟踪BIOS 的执行 改写Makefile文件 lab1-mon: $(UCOREIMG) $(V)$(TERMINAL) -e "$(QEMU) -S -s -d in_asm -D $(BINDIR)/q.log -monitor stdio -hda $< -serial null" $(V)sleep 2 $(V)$(TERMINAL) -e "gdb -q -x tools/lab1init" 在调用qemu时增加-d in_asm -D q.log参数,便可以将运行的汇编指令保存在q.log 中。 (2)在初始化位置0x7c00 设置实地址断点,测试断点正常。 在tools/gdbinit结尾加上 set architecture i8086 b *0x7c00 //在0x7c00处设置断点。 continue x /2i $pc //显示当前eip处的汇编指令 (3)将执行的汇编代码与bootasm.S 和bootblock.asm 进行比较,看看二者是否一致。 Notice:在q.log中进入BIOS之后的跳转地址与实际应跳转地址不相符,汇编代码也 与bootasm.S 和bootblock.asm不相同。 这是由于在gdb之中调试的原因,可以直接输入make debug,在生成的qemu虚拟机之中进行调试可以看到在虚拟机中运行的汇编代码,之后再与bootasm.S 和bootblock.asm 进行比较。

Lab3实验报告

2012 简单的类MIPS单周 期处理器实现–控 制器,ALU LAB3实验报告 王红宾61 精品归纳 | F0905103

1实验概述 实验名称 简单的类MIPS单周期处理器实现–控制器,ALU 实验目的 1.理解CPU控制器,ALU的原理 实验范围 本次实验将覆盖以下范围 1.ISE的使用 2.Spartan-3E实验板的使用 3.使用Verilog HDL进行逻辑设计 4.CPU控制器的实现 5.ALU的实现 注意事项 1. 本实验的逻辑设计工具为Xilinx 。 2实验内容 实验步骤 1.启动ISE 。 2.选择File > New Project… 出现New Project Wizard。 3.Project Name填写lab5,选择工程Project Location,Top-level Source Type选择HDL。点击Next。

4. Device Properties 中各属性填写如下: Product Category: ALL Family: Spartan3E Device: XC3S500E Package: FG320 Speed: -4 Synthesis Tool: XST(VHDL/Verilog) Simulator: ISim (VHDL/Verilog) ,也可用Modelsim仿真。Preferred Language: Verilog 确认Enable Enhanced Design Summary 已勾选

5. 点击Next 6. 在New Project Wizard –Create New Source中点击Next 7. 在New Project Wizard –Add Existing Sources中点击Next 8. 在New Project Wizard –Project Summary中点击Finish,结束建立工程 3主控制单元模块CTR 模块描述 主控制单元输入为指令的opCode字段,即操作码。操作码经过主控制单元的译码,给ALUCtr,Data Memory,Registers,Muxs等部件输出正确的控制信号。

相关文档