EEE103/24-25/S1/HW Questions

Java Python EEE103/24-25/S1/HW Questions

Homework Assignment (HW)

This homework assignment is comprised of five questions*  from all three parts of EEE103 content, with three questions from Part 1, one question from the Part 2, and one question from Part 3. This homework assignment has a full mark of 100, which contributes to 15% of the module marks.

*Please be reminded that the Final Exam (and Resit Exam) questions in AY24/25 are comprised of three larger question (also with multiple sub-questions) -  one from each part of the module content, with marks ratio of 40:30:30.

Part 1 (Weeks 1-4 content; 60 marks)

Q1. Refer to the circuit shown in Figure Q1.

(a) Use nodal analysis to calculate vx as indicated in the circuit.                                      [12 marks]

(b) Employ superposition to determine the value of vx caused by the 5V voltage source alone.          [8 marks]

Figure Q1

Q2. Consider the circuit in Figure Q2. i1, i2, i3  are the mesh currents in mesh 1, mesh 2 and mesh 3, respectively.

(a) Use mesh analysis/supermesh techniques to calculate the mesh current i1, i2, and i3.   [12 marks]

(b) Calculate the power delivered or absorbed by each independent voltage source and identify which source(s) is delivering power and which source(s) is absorbing power.             [8 marks]

Figure Q2

Q3. Consider the circuit in Figure Q3.

(a) Determine the Norton equivalent circuit with respect to terminal a and terminal b (i.e., drawing the Norton equivalent circuit and calculating RN and IN).                       [15 marks]

(b) Suppose that load resistor RL is connected between terminal a and terminal b. What’s the value of RL that will result in the maximum power transfer to the load resistor? What is the maximum power dissipation in RL.       [5 marks]

Figure Q3

Part 2 (Weeks 5-8 content; 20 marks)

Q4.

(a) Calculate Vo  for the circuit in Figure Q4a.                                                                     [4 marks]

Figure Q4a

Figure Q4b

(b) For the single supply comparator Schmitt trigger circuit shown in Figure Q4b, to achieve a voltage output of 0 V or 5 V and a memory window between 1 V and 4 V, calculate the values of R2  and R3  ifR1  = 3 kΩ, vref  = 1 V.        [6 marks]

(c) For the circuit shown in Figure Q4c, determine

(i) vc (0 − ); (ii) vc (0+); (iii) The circuit time constant; (iv) vc (4 ms).                         [6 marks]

Figure Q4c

Figure Q4d

(d) For the circuit shown in Figure Q4d, assume an ideal op-amp, determine vo (2.5us) if vs  is equal to 4e−400,000t  u (t) V.      [4 marks]

Part 3 (Weeks 9-12 content; 20 marks)

Q5. Figure Q5 shows an electric circuit supplied by an AC source vs(t) = 50cos(20t) V. There is a load Zload connected across the output terminals A and B. [Note: for sub-questions asking for comments, please give a concise description, and keep the number of words to below 50; for all numerical calculations, please show the correct steps in reaching the final answers.]

Figure Q5

(a) Re-draw the entire circuit in the phasor domain. Clearly state the phasor values of the voltage source, the impedances of the passive components (i.e., resistor, inductor, and capacitor), as well as the frequency at which the phasor circuit is operating.     [4 marks]

(b) Given that Zload = 10 Ω (which means 10 +j0 Ω), and your task now is to solve, through phasor domain, for vload(t) and iload(t). Comment and decide on which circuit analytical method among the few below is the most convenient in your opinion to be employed for the task: mesh analysis, nodal analysis, and Thévenin equivalent circuit. Then, with the help of a clearly annotated circuit/figure, proceed to use the chosen method to solve for Vload and Iload, and then vload(t) and iload(t).                                                               [10 marks]

(c) Now, Zload, being (R +jX) Ω, is a new but unknown load. Elaborate on whether the reactance X, which only consumes reactive power, has any role in affecting the active power dissipation  at Zload.  Then,  determine  the  value  of Zload that  would  lead  to  maximum  active  power  transfer/dissipation at load Zload, and compute the complex powers S absorbed by this new load         

// 展示组件页面 <template> <el-container style="height: 100%; border: 1px solid #eee"> <el-aside width="200px" style="background-color: rgb(238, 241, 246)"> <el-menu :default-openeds="['', '']" router> <el-submenu index="0"> <template slot="title"> <i class="el-icon-setting"></i>数据管理</template > <el-menu-item-group> <el-menu-item index="/adminChart">数据统计</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="1"> <template slot="title"> <i class="el-icon-setting"></i>信息管理</template > <el-menu-item-group> <el-menu-item index="/adminBulletin">公告管理</el-menu-item> <el-menu-item index="/adminFeedback">反馈信息</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="2"> <template slot="title"><i class="el-icon-menu"></i>用户管理</template> <el-menu-item-group> <el-menu-item index="/adminUser">用户信息</el-menu-item> <el-menu-item index="/adminCoach">教练信息</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="3"> <template slot="title"> <i class="el-icon-setting"></i>课程管理</template > <el-menu-item-group> <el-menu-item index="/adminCourse">课程信息</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="4"> <template slot="title"> <i class="el-icon-setting"></i>器材管理</template > <el-menu-item-group> <el-menu-item index="/adminEquipment">器材管理</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="5"> <template slot="title"><i class="el-icon-menu"></i>预约日志</template> <el-menu-item-group> <el-menu-item index="/adminCourseAppointment" >课程预约</el-menu-item > <el-menu-item index="/adminCoachAppointment">教练预约</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="6"> <template slot="title"><i class="el-icon-menu"></i>个人中心</template> <el-menu-item-group> <el-menu-item index="/updateAdmin">个人信息</el-menu-item> </el-menu-item-group> </el-submenu> </el-menu> </el-aside> <el-container> <el-header style="text-align: right; font-size: 12px"> <el-dropdown> <i class="el-icon-setting" style="margin-right: 15px">设置</i> <el-dropdown-menu slot="dropdown"> <el-dropdown-item>注销</el-dropdown-item> </el-dropdown-menu> </el-dropdown> </el-header> <el-main> <router-view></router-view> </el-main> </el-container> </el-container> </template> <script> export default { data() { return {}; }, methods: {}, }; </script> <style> .el-header { background-color: #b3c0d1; color: #333; line-height: 60px; } .el-aside { color: #333; } html, body, #app, .el-container { /*设置内部填充为0,几个布局元素之间没有间距*/ padding: 0px; /*外部间距也是如此设置*/ margin: 0px; /*统一设置高度为100%*/ height: 100vh; } .el-aside { height: 100%; background-color: #d3dce6; } </style> 点击注销回到登陆页面
09-20
你已经有一个完整的左侧菜单导航的后台管理布局,现在需要实现: > **点击“注销”按钮后,退出登录并跳转到登录页(如 `/login`)** --- ### ✅ 实现目标 - 点击右上角「设置」→「注销」 - 清除用户登录状态(如:清除 token) - 跳转到登录页面 `/login` - 防止返回时还能访问管理员页面(需配合路由守卫) --- ## ✅ 修改后的完整代码(含“注销”功能) ```vue <template> <el-container style="height: 100%; border: 1px solid #eee"> <el-aside width="200px" style="background-color: rgb(238, 241, 246)"> <el-menu :default-openeds="['', '']" router> <el-submenu index="0"> <template slot="title"> <i class="el-icon-setting"></i>数据管理 </template> <el-menu-item-group> <el-menu-item index="/adminChart">数据统计</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="1"> <template slot="title"> <i class="el-icon-setting"></i>信息管理 </template> <el-menu-item-group> <el-menu-item index="/adminBulletin">公告管理</el-menu-item> <el-menu-item index="/adminFeedback">反馈信息</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="2"> <template slot="title"> <i class="el-icon-menu"></i>用户管理 </template> <el-menu-item-group> <el-menu-item index="/adminUser">用户信息</el-menu-item> <el-menu-item index="/adminCoach">教练信息</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="3"> <template slot="title"> <i class="el-icon-setting"></i>课程管理 </template> <el-menu-item-group> <el-menu-item index="/adminCourse">课程信息</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="4"> <template slot="title"> <i class="el-icon-setting"></i>器材管理 </template> <el-menu-item-group> <el-menu-item index="/adminEquipment">器材管理</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="5"> <template slot="title"> <i class="el-icon-menu"></i>预约日志 </template> <el-menu-item-group> <el-menu-item index="/adminCourseAppointment">课程预约</el-menu-item> <el-menu-item index="/adminCoachAppointment">教练预约</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu index="6"> <template slot="title"> <i class="el-icon-menu"></i>个人中心 </template> <el-menu-item-group> <el-menu-item index="/updateAdmin">个人信息</el-menu-item> </el-menu-item-group> </el-submenu> </el-menu> </el-aside> <el-container> <el-header style="text-align: right; font-size: 12px; display: flex; align-items: center; justify-content: flex-end"> <el-dropdown @command="handleCommand"> <i class="el-icon-setting" style="margin-right: 15px; cursor: pointer">设置</i> <el-dropdown-menu slot="dropdown"> <el-dropdown-item command="logout">注销</el-dropdown-item> </el-dropdown-menu> </el-dropdown> </el-header> <el-main> <router-view></router-view> </el-main> </el-container> </el-container> </template> <script> export default { name: 'AdminLayout', methods: { // 处理下拉菜单命令 handleCommand(command) { if (command === 'logout') { // 1. 清除 token(假设你使用 localStorage 存储) localStorage.removeItem('token'); // 或 'adminToken' localStorage.removeItem('userInfo'); // 2. 可选:提示用户 this.$message({ type: 'success', message: '已成功注销!', duration: 1500 }); // 3. 跳转到登录页 this.$router.push('/login'); } } } }; </script> <style> .el-header { background-color: #b3c0d1; color: #333; line-height: 60px; padding: 0 20px; } .el-aside { color: #333; } html, body, #app, .el-container { padding: 0; margin: 0; height: 100vh; } .el-aside { height: 100%; background-color: #f4f5f7; } </style> ``` --- ## ✅ 关键点说明 | 功能 | 实现方式 | |------|----------| | **绑定点击事件** | 使用 `@command` 和 `command="logout"` 触发逻辑 | | **清除登录状态** | `localStorage.removeItem('token')` | | **跳转登录页** | `this.$router.push('/login')` | | **用户体验优化** | 添加 `$message` 提示 | --- ## 🔐 建议补充:路由守卫(防止未登录访问) 在 `router/index.js` 中添加守卫,确保未登录不能访问 `/admin*` 页面。 ```js // router/index.js router.beforeEach((to, from, next) => { const requiresAuth = to.matched.some(record => record.meta.requiresAuth); const token = localStorage.getItem('token'); if (requiresAuth && !token) { next('/login'); } else { next(); } }); ``` 然后给所有管理员页面的路由加上 `meta: { requiresAuth: true }`: ```js { path: '/adminChart', component: AdminChart, meta: { requiresAuth: true } } ``` --- ###
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值