emacs 使用积累2 unittest.el

【扩展卡尔曼滤波器EKF】基于UWB雷达的SLAM能够在室内环境内映射自然点地标,并改善机器人定位(Matlab代码实现) 内容概要:本文档提供了名为“Plecs全桥LLC谐振变换器仿真模型”的资源,主要用于电力电子领域中LLC谐振变换器的建模与仿真研究。该模型基于Plecs软件平台构建,聚焦于全桥LLC拓扑结构,涵盖其工作原理、关键参数设计及动态性能仿真,帮助用户深入理解LLC谐振变换器在软开关、高效率功率转换方面的特性与实现方法。文档内容包括系统建模、主电路参数计算、控制策略实现以及仿真结果分析等部分,适用于高频高效电源变换器的研发与教学实践。; 适合人群:具备电力电子与电力系统基础知识,从事电源变换器设计、仿真与优化工作的工程师及高校研究生。; 使用场景及目标:① 掌握LLC谐振变换器的工作机理与Plecs仿真建模流程;② 学习全桥LLC拓扑的参数设计与软开关实现方法;③ 为高频高效DC-DC变换器的科研、课程设计或工程项目提供仿真基础和技术参考。; 阅读建议:建议结合电力电子技术教材与Plecs官方文档同步学习,重点理解谐振腔参数(如Lr、Cr、Lm)对增益特性与软开关的影响,并通过调整仿真参数验证不同工况下的系统响应,以加深对LLC变换器设计规律的理解。 立即下载


 

unittest.el

(require 'kreatel-c++-header-common "c++-header-common.el")

 

;;; ---------------------------------------------------------------------------

;;; Functions to create a TestMain.cpp

 

(defun kreatel-create-test-main ()

  (interactive)

  (progn

    (setq directory (file-name-as-directory

                     (concat (file-name-directory (buffer-file-name))

                             "testcases")))

    (setq filename (concat directory "TestMain.cpp"))

    (if (not (file-directory-p directory))

        (message (concat "The directory " directory " doesn't exist!"))

      (if (file-exists-p filename)

          (message "TestMain.cpp already exists!")

        (progn

          (switch-to-buffer (find-file-noselect filename))

          (goto-char (point-min))

          (kreatel-common-insert-header "TestMain.cpp"

                                        "Main function for running unit tests")

          (insert "#include \"testcases/T?Tests.h\"\n\n")

          (insert "#include \"debug/TStderrTracker.h\"\n")

          (insert "#include \"debug/TNullTracker.h\"\n")

          (insert "#include \"test/console/TVerboseConsoleTestResult.h\"\n\n")

          (insert "#define EXTRA_TEST_OUTPUT\n\n")

          (kreatel-separator)

          (insert "// Tracker\n\n")

          (insert "TTracker* TTracker::GetProcessTracker()\n")

          (insert "{\n")

          (insert "#ifdef EXTRA_TEST_OUTPUT\n")

          (insert "  static TStderrTracker tracker(TrackAll);\n")

          (insert "#else\n")

          (insert "  static TNullTracker tracker;\n")

          (insert "#endif\n")

          (insert "  return &tracker;\n")

          (insert "}\n\n")

          (kreatel-separator)

          (insert "// main\n\n")

          (insert "int main(int /*argc*/, char** /*argv*/)\n")

          (insert "{\n")

          (save-excursion

            (insert "  TTestSuite suite(?);\n")

            (insert "  suite.AddTest(T?Tests::GetSuite());\n\n")

            (insert "  TVerboseConsoleTestResult result;\n")

            (insert "#ifndef EXTRA_TEST_OUTPUT\n")

            (insert "  result.SetVerbose(false);\n")

            (insert "#endif\n")

            (insert "  suite.Run(&result);\n\n")

            (insert "  result.PrintSummary();\n")

            (insert "  return result.WasSuccessful() ? 0 : 1;\n")

            (insert "}\n"))

          (c++-mode))))))

 

 

;;; ---------------------------------------------------------------------------

;;; Functions to create test classes for a specific class.

 

(defun kreatel-create-test-h-file (buffername filename classname testclassname)

  (save-excursion

    (set-buffer buffername)

    (goto-char (point-min))

    (kreatel-common-insert-header filename (concat "Tests for " classname))

    (insert "#ifndef " (upcase testclassname) "_H\n")

    (insert "#define " (upcase testclassname) "_H\n\n")

    (insert "#include \"test/TTestCase.h\"\n")

    (insert "#include \"test/TMethodRecorder.h\"\n\n")

    (insert "class " testclassname " : public TTestCase\n")

    (insert "{\n")

    (insert "private:\n")

    (insert "  TMethodRecorder Recorder;\n\n")

    (insert "  void Test1();")

    (save-excursion

      (insert "\n\npublic:\n")

      (insert "  " testclassname "(const std::string& name);\n")

      (insert "  static TTest* GetSuite();\n")

      (insert "};\n\n")

      (insert "#endif\n"))

    (c++-mode)))

 

 

(defun kreatel-create-test-cpp-file (buffername cpp-file h-file

                                     classname testclassname)

  (save-excursion

    (set-buffer buffername)

    (goto-char (point-min))

    (kreatel-common-insert-header cpp-file (concat "Tests for " classname))

    (insert "#include \"testcases/" h-file "\"\n\n")

    (insert "#include \"" classname ".h\"\n\n")

    (insert "#include \"test/TTestSuite.h\"\n")

    (insert "#include \"test/TTestCaller.h\"\n\n\n")

    (kreatel-separator)

    (insert "// Private functions\n\n")

    (insert "void " testclassname "::Test1()\n")

    (insert "{\n")

    (insert "  // TODO")

    (save-excursion

      (insert "\n}\n\n\n")

      (kreatel-separator)

      (insert "// Public functions\n\n")

      (insert testclassname "::" testclassname "(const std::string& name)\n")

      (insert "  : TTestCase(name)\n")

      (insert "{\n")

      (insert "  // Empty\n")

      (insert "}\n\n")

      (insert "TTest* " testclassname "::GetSuite()\n")

      (insert "{\n")

      (insert "  TTestSuite* testSuite = new TTestSuite(\""

              testclassname "\");\n\n")

      (insert "  testSuite->AddTest(ALLOC_CALLER("

              testclassname ", Test1));\n")

      (insert "  return testSuite;\n")

      (insert "}\n"))

    (c++-mode)))

 

 

(defun kreatel-create-test-class ()

  (interactive)

  (let (classname pos testclassname directory

        h-file cpp-file h-buffer cpp-buffer)

    (setq classname (file-name-nondirectory (buffer-file-name)))

    (if (not (string-match "T.*\\.\\(h\\|cpp\\)" classname))

        (message "The class file must be named T<name>.h/cpp.")

      (progn

        (setq pos (string-match "\\." classname))

        (setq classname (substring classname 0 pos))

        (setq testclassname (concat (substring classname 0 pos) "Tests"))

        (setq directory (file-name-as-directory

                         (concat (file-name-directory (buffer-file-name))

                                 "testcases")))

        (if (not (file-directory-p directory))

            (message (concat "The directory " directory " doesn't exist!"))

          (progn

            (setq h-file (concat testclassname ".h"))

            (setq cpp-file (concat testclassname ".cpp"))

            (if (or (file-exists-p (concat directory h-file))

                    (file-exists-p (concat cpp-file)))

                (message "The test .h or .cpp-file already exists!")

              (progn

                (setq h-buffer (find-file-noselect (concat directory h-file)))

                (setq cpp-buffer (find-file-noselect

                                  (concat directory cpp-file)))

                (kreatel-create-test-h-file h-buffer h-file

                                            classname testclassname)

                (kreatel-create-test-cpp-file cpp-buffer cpp-file h-file

                                              classname testclassname)

                (switch-to-buffer h-buffer)))))))))

 

 

;;; ---------------------------------------------------------------------------

;;; Functions to create mock classes for a specific interface.

 

(defun kreatel-print-function-definitions (funlist)

  (if (not (null funlist))

      (progn

        (insert "  virtual " (cadr (car funlist)) ";\n")

        (kreatel-print-function-definitions (cdr funlist)))))

 

 

(defun kreatel-print-function-declarations (ifcname classname funlist)

  (let (returntype funstring)

    (if (not (null funlist))

        (progn

          (setq funstring (cadr (car funlist)))

          (string-match "\\(\\s \\|\\\n\\)+" funstring)

          (setq returntype (substring funstring 0 (match-end 0)))

          (setq funstring (substring funstring (match-end 0)))

          (insert "inline " returntype classname "::\n" funstring "\n")

          (insert "{\n")

          (insert "  Recorder.Push(\"" ifcname "::" (car (car funlist))

                  "()\");\n")

          (insert "}\n\n")

          (kreatel-print-function-declarations ifcname

                                               classname (cdr funlist))))))

 

 

 

(defun kreatel-create-mock-h-file (buffername filename ifcname mockclassname

                                   funlist)

  (save-excursion

    (set-buffer buffername)

    (goto-char (point-min))

    (kreatel-common-insert-header filename

                                  (concat "Mock class for interface " ifcname))

    (insert "#ifndef " (upcase mockclassname) "_H\n")

    (insert "#define " (upcase mockclassname) "_H\n\n")

    (insert "#include \"" ifcname ".h\"\n")

    (insert "#include \"test/TMethodRecorder.h\"\n\n")

    (insert "class " mockclassname " : public " ifcname "\n")

    (insert "{\n")

    (insert "private:\n")

    (insert "  TMethodRecorder& Recorder;\n\n")

    (insert "public:\n")

    (insert "  " mockclassname

            "(TMethodRecorder& recorder) throw ();\n\n")

    (kreatel-print-function-definitions funlist)

    (save-excursion

      (insert "};\n\n")

      (kreatel-separator)

      (insert "// Inlined functions\n\n")

      (insert "inline " mockclassname "::\n" mockclassname

              "(TMethodRecorder& recorder) throw ()\n")

      (insert "  : Recorder(recorder)\n")

      (insert "{\n")

      (insert "  // Empty\n")

      (insert "}\n\n")

      (kreatel-print-function-declarations ifcname mockclassname funlist)

      (insert "#endif\n"))

    (c++-mode))

  (switch-to-buffer h-buffer))

 

 

(defun kreatel-parse-ifc-functions (ifcname)

  (let ((functions nil)

        endpos

        nextstartpos

        tmppos

        funstring)

    (save-excursion

      (goto-char (point-min))

      (if (not (re-search-forward

                (concat "class\\(\\s \\|\n\\)+" ifcname

                        "\\(\\s \\|\n\\)*{\\(\\s \\|\n\\)*"

                        "public:\\(\\s \\|\n\\)*") nil t))

          (message (concat "Could not find interface " ifcname "."))

        (while (re-search-forward

                "\\(\\s \\|\n\\)*=\\(\\s \\|\n\\)*0\\(\\s \\|\n\\)*;"

                nil t)

          (setq endpos (match-beginning 0))

          (setq nextstartpos (match-end 0))

          (if (re-search-backward "virtual\\(\\s \\|\n\\)+")

              (progn

                (setq funstring (buffer-substring (match-end 0) endpos))

                (if (string-match "\\sw+\\*?\\(\\s \\|\n\\)*" funstring)

                    (progn

                      (setq tmppos (match-end 0))

                      (if (string-match "\\sw+\\(\\s \\|\n\\)*\("

                                        funstring tmppos)

                          (progn

                            (message funstring)

                            (setq functions

                                  (cons (list (substring funstring tmppos

                                                       (- (match-end 0) 1))

                                              funstring)

                                        functions))))))))

          (goto-char nextstartpos)))

      (reverse functions))))

 

 

(defun kreatel-create-mock-class ()

  (interactive)

  (let (ifcname mockclassname directory h-file h-buffer funlist)

    (setq ifcname (file-name-nondirectory (buffer-file-name)))

    (if (not (string-match "I\\sw*\\.h" ifcname))

        (message "The interface file must be named I<name>.h.")

      (progn

        (setq ifcname (substring ifcname 0 (- (match-end 0) 2)))

        (setq mockclassname (concat "TMock" (substring ifcname 1)))

        (setq directory (file-name-as-directory

                         (concat (file-name-directory (buffer-file-name))

                                 "testcases")))

        (if (not (file-directory-p directory))

            (message (concat "The directory " directory " doesn't exist!"))

          (progn

            (setq h-file (concat mockclassname ".h"))

            (if (file-exists-p (concat directory h-file))

                (message ("The mock class .h-file already exists!"))

              (progn

                (setq funlist (kreatel-parse-ifc-functions ifcname))

                (if (not (null funlist))

                    (progn

                      (setq h-buffer (find-file-noselect

                                      (concat directory h-file)))

                      (kreatel-create-mock-h-file h-buffer h-file ifcname

                                                  mockclassname funlist)

                      (switch-to-buffer h-buffer) ))))))))))

 

 

;;; ---------------------------------------------------------------------------

 

(provide 'kreatel-unit-test)

 

 

unittest.el

(require 'kreatel-c++-header-common "c++-header-common.el")

 

;;; ---------------------------------------------------------------------------

;;; Functions to create a TestMain.cpp

 

(defun kreatel-create-test-main ()

  (interactive)

  (progn

    (setq directory (file-name-as-directory

                     (concat (file-name-directory (buffer-file-name))

                             "testcases")))

    (setq filename (concat directory "TestMain.cpp"))

    (if (not (file-directory-p directory))

        (message (concat "The directory " directory " doesn't exist!"))

      (if (file-exists-p filename)

          (message "TestMain.cpp already exists!")

        (progn

          (switch-to-buffer (find-file-noselect filename))

          (goto-char (point-min))

          (kreatel-common-insert-header "TestMain.cpp"

                                        "Main function for running unit tests")

          (insert "#include \"testcases/T?Tests.h\"\n\n")

          (insert "#include \"debug/TStderrTracker.h\"\n")

          (insert "#include \"debug/TNullTracker.h\"\n")

          (insert "#include \"test/console/TVerboseConsoleTestResult.h\"\n\n")

          (insert "#define EXTRA_TEST_OUTPUT\n\n")

          (kreatel-separator)

          (insert "// Tracker\n\n")

          (insert "TTracker* TTracker::GetProcessTracker()\n")

          (insert "{\n")

          (insert "#ifdef EXTRA_TEST_OUTPUT\n")

          (insert "  static TStderrTracker tracker(TrackAll);\n")

          (insert "#else\n")

          (insert "  static TNullTracker tracker;\n")

          (insert "#endif\n")

          (insert "  return &tracker;\n")

          (insert "}\n\n")

          (kreatel-separator)

          (insert "// main\n\n")

          (insert "int main(int /*argc*/, char** /*argv*/)\n")

          (insert "{\n")

          (save-excursion

            (insert "  TTestSuite suite(?);\n")

            (insert "  suite.AddTest(T?Tests::GetSuite());\n\n")

            (insert "  TVerboseConsoleTestResult result;\n")

            (insert "#ifndef EXTRA_TEST_OUTPUT\n")

            (insert "  result.SetVerbose(false);\n")

            (insert "#endif\n")

            (insert "  suite.Run(&result);\n\n")

            (insert "  result.PrintSummary();\n")

            (insert "  return result.WasSuccessful() ? 0 : 1;\n")

            (insert "}\n"))

          (c++-mode))))))

 

 

;;; ---------------------------------------------------------------------------

;;; Functions to create test classes for a specific class.

 

(defun kreatel-create-test-h-file (buffername filename classname testclassname)

  (save-excursion

    (set-buffer buffername)

    (goto-char (point-min))

    (kreatel-common-insert-header filename (concat "Tests for " classname))

    (insert "#ifndef " (upcase testclassname) "_H\n")

    (insert "#define " (upcase testclassname) "_H\n\n")

    (insert "#include \"test/TTestCase.h\"\n")

    (insert "#include \"test/TMethodRecorder.h\"\n\n")

    (insert "class " testclassname " : public TTestCase\n")

    (insert "{\n")

    (insert "private:\n")

    (insert "  TMethodRecorder Recorder;\n\n")

    (insert "  void Test1();")

    (save-excursion

      (insert "\n\npublic:\n")

      (insert "  " testclassname "(const std::string& name);\n")

      (insert "  static TTest* GetSuite();\n")

      (insert "};\n\n")

      (insert "#endif\n"))

    (c++-mode)))

 

 

(defun kreatel-create-test-cpp-file (buffername cpp-file h-file

                                     classname testclassname)

  (save-excursion

    (set-buffer buffername)

    (goto-char (point-min))

    (kreatel-common-insert-header cpp-file (concat "Tests for " classname))

    (insert "#include \"testcases/" h-file "\"\n\n")

    (insert "#include \"" classname ".h\"\n\n")

    (insert "#include \"test/TTestSuite.h\"\n")

    (insert "#include \"test/TTestCaller.h\"\n\n\n")

    (kreatel-separator)

    (insert "// Private functions\n\n")

    (insert "void " testclassname "::Test1()\n")

    (insert "{\n")

    (insert "  // TODO")

    (save-excursion

      (insert "\n}\n\n\n")

      (kreatel-separator)

      (insert "// Public functions\n\n")

      (insert testclassname "::" testclassname "(const std::string& name)\n")

      (insert "  : TTestCase(name)\n")

      (insert "{\n")

      (insert "  // Empty\n")

      (insert "}\n\n")

      (insert "TTest* " testclassname "::GetSuite()\n")

      (insert "{\n")

      (insert "  TTestSuite* testSuite = new TTestSuite(\""

              testclassname "\");\n\n")

      (insert "  testSuite->AddTest(ALLOC_CALLER("

              testclassname ", Test1));\n")

      (insert "  return testSuite;\n")

      (insert "}\n"))

    (c++-mode)))

 

 

(defun kreatel-create-test-class ()

  (interactive)

  (let (classname pos testclassname directory

        h-file cpp-file h-buffer cpp-buffer)

    (setq classname (file-name-nondirectory (buffer-file-name)))

    (if (not (string-match "T.*\\.\\(h\\|cpp\\)" classname))

        (message "The class file must be named T<name>.h/cpp.")

      (progn

        (setq pos (string-match "\\." classname))

        (setq classname (substring classname 0 pos))

        (setq testclassname (concat (substring classname 0 pos) "Tests"))

        (setq directory (file-name-as-directory

                         (concat (file-name-directory (buffer-file-name))

                                 "testcases")))

        (if (not (file-directory-p directory))

            (message (concat "The directory " directory " doesn't exist!"))

          (progn

            (setq h-file (concat testclassname ".h"))

            (setq cpp-file (concat testclassname ".cpp"))

            (if (or (file-exists-p (concat directory h-file))

                    (file-exists-p (concat cpp-file)))

                (message "The test .h or .cpp-file already exists!")

              (progn

                (setq h-buffer (find-file-noselect (concat directory h-file)))

                (setq cpp-buffer (find-file-noselect

                                  (concat directory cpp-file)))

                (kreatel-create-test-h-file h-buffer h-file

                                            classname testclassname)

                (kreatel-create-test-cpp-file cpp-buffer cpp-file h-file

                                              classname testclassname)

                (switch-to-buffer h-buffer)))))))))

 

 

;;; ---------------------------------------------------------------------------

;;; Functions to create mock classes for a specific interface.

 

(defun kreatel-print-function-definitions (funlist)

  (if (not (null funlist))

      (progn

        (insert "  virtual " (cadr (car funlist)) ";\n")

        (kreatel-print-function-definitions (cdr funlist)))))

 

 

(defun kreatel-print-function-declarations (ifcname classname funlist)

  (let (returntype funstring)

    (if (not (null funlist))

        (progn

          (setq funstring (cadr (car funlist)))

          (string-match "\\(\\s \\|\\\n\\)+" funstring)

          (setq returntype (substring funstring 0 (match-end 0)))

          (setq funstring (substring funstring (match-end 0)))

          (insert "inline " returntype classname "::\n" funstring "\n")

          (insert "{\n")

          (insert "  Recorder.Push(\"" ifcname "::" (car (car funlist))

                  "()\");\n")

          (insert "}\n\n")

          (kreatel-print-function-declarations ifcname

                                               classname (cdr funlist))))))

 

 

 

(defun kreatel-create-mock-h-file (buffername filename ifcname mockclassname

                                   funlist)

  (save-excursion

    (set-buffer buffername)

    (goto-char (point-min))

    (kreatel-common-insert-header filename

                                  (concat "Mock class for interface " ifcname))

    (insert "#ifndef " (upcase mockclassname) "_H\n")

    (insert "#define " (upcase mockclassname) "_H\n\n")

    (insert "#include \"" ifcname ".h\"\n")

    (insert "#include \"test/TMethodRecorder.h\"\n\n")

    (insert "class " mockclassname " : public " ifcname "\n")

    (insert "{\n")

    (insert "private:\n")

    (insert "  TMethodRecorder& Recorder;\n\n")

    (insert "public:\n")

    (insert "  " mockclassname

            "(TMethodRecorder& recorder) throw ();\n\n")

    (kreatel-print-function-definitions funlist)

    (save-excursion

      (insert "};\n\n")

      (kreatel-separator)

      (insert "// Inlined functions\n\n")

      (insert "inline " mockclassname "::\n" mockclassname

              "(TMethodRecorder& recorder) throw ()\n")

      (insert "  : Recorder(recorder)\n")

      (insert "{\n")

      (insert "  // Empty\n")

      (insert "}\n\n")

      (kreatel-print-function-declarations ifcname mockclassname funlist)

      (insert "#endif\n"))

    (c++-mode))

  (switch-to-buffer h-buffer))

 

 

(defun kreatel-parse-ifc-functions (ifcname)

  (let ((functions nil)

        endpos

        nextstartpos

        tmppos

        funstring)

    (save-excursion

      (goto-char (point-min))

      (if (not (re-search-forward

                (concat "class\\(\\s \\|\n\\)+" ifcname

                        "\\(\\s \\|\n\\)*{\\(\\s \\|\n\\)*"

                        "public:\\(\\s \\|\n\\)*") nil t))

          (message (concat "Could not find interface " ifcname "."))

        (while (re-search-forward

                "\\(\\s \\|\n\\)*=\\(\\s \\|\n\\)*0\\(\\s \\|\n\\)*;"

                nil t)

          (setq endpos (match-beginning 0))

          (setq nextstartpos (match-end 0))

          (if (re-search-backward "virtual\\(\\s \\|\n\\)+")

              (progn

                (setq funstring (buffer-substring (match-end 0) endpos))

                (if (string-match "\\sw+\\*?\\(\\s \\|\n\\)*" funstring)

                    (progn

                      (setq tmppos (match-end 0))

                      (if (string-match "\\sw+\\(\\s \\|\n\\)*\("

                                        funstring tmppos)

                          (progn

                            (message funstring)

                            (setq functions

                                  (cons (list (substring funstring tmppos

                                                       (- (match-end 0) 1))

                                              funstring)

                                        functions))))))))

          (goto-char nextstartpos)))

      (reverse functions))))

 

 

(defun kreatel-create-mock-class ()

  (interactive)

  (let (ifcname mockclassname directory h-file h-buffer funlist)

    (setq ifcname (file-name-nondirectory (buffer-file-name)))

    (if (not (string-match "I\\sw*\\.h" ifcname))

        (message "The interface file must be named I<name>.h.")

      (progn

        (setq ifcname (substring ifcname 0 (- (match-end 0) 2)))

        (setq mockclassname (concat "TMock" (substring ifcname 1)))

        (setq directory (file-name-as-directory

                         (concat (file-name-directory (buffer-file-name))

                                 "testcases")))

        (if (not (file-directory-p directory))

            (message (concat "The directory " directory " doesn't exist!"))

          (progn

            (setq h-file (concat mockclassname ".h"))

            (if (file-exists-p (concat directory h-file))

                (message ("The mock class .h-file already exists!"))

              (progn

                (setq funlist (kreatel-parse-ifc-functions ifcname))

                (if (not (null funlist))

                    (progn

                      (setq h-buffer (find-file-noselect

                                      (concat directory h-file)))

                      (kreatel-create-mock-h-file h-buffer h-file ifcname

                                                  mockclassname funlist)

                      (switch-to-buffer h-buffer) ))))))))))

 

 

;;; ---------------------------------------------------------------------------

 

(provide 'kreatel-unit-test)

 

半桥LLC谐振DCDC变换器的设计与仿真(Simulink仿真实现) 内容概要:本文系统阐述了半桥LLC谐振DCDC变换器的设计与仿真方法,聚焦于其在Simulink环境下的建模、关键参数设计及闭环控制策略的实现。内容深入剖析了LLC谐振变换器的工作原理,包括谐振腔元件(Lr、Cr、Lm)的精确计算与优化方法,详细探讨了实现零电压开通(ZVS)等软开关技术的关键条件,并介绍了变频控制与恒压恒流双闭环控制逻辑的设计思路。通过构建完整的Simulink仿真模型,文章验证了系统在不同负载工况下的动态响应能力、高效率特性和良好的稳态性能,为理论分析提供了强有力的实践支撑。; 适合人群:具备电力电子技术基础理论知识和Simulink软件操作经验的电气工程、自动化及相关专业的本科高年级学生、研究生,以及从事开关电源、新能源变换器等电力电子设备研发的工程师。; 使用场景及目标:①深入理解LLC谐振变换器的核心工作机理与谐振参数的设计准则;②掌握在Simulink中搭建高保真度电力电子变换器仿真模型并实现复杂闭环控制的技术;③为高效率、高功率密度电源产品的研发提供理论指导、设计范例与仿真验证平台。; 阅读建议:建议读者结合文中的理论推导与仿真模型进行同步实践,重点动手调整谐振频率、观察ZVS实现过程,并反复调试PI控制器参数以优化系统的动态与稳态响应,从而深刻领悟LLC变换器的非线性动态特性和先进控制策略的精髓。 立即下载

相关推荐

状态估计【卡尔曼滤波kalman】UKF、EKF、粒子滤波PF学习与研究(Matlab代码实现)

内容概要:本文系统性地探讨了状态估计领域中的三种关键非线性滤波算法——无迹卡尔曼滤波(UKF)、扩展卡尔曼滤波(EKF)和粒子滤波(PF),深入剖析其理论基础、数学推导及在非线性、非高斯系统环境下的适用性差异。通过Matlab编程实现,详尽展示了各算法的核心步骤与仿真流程,并结合无人机姿态估计、轨迹跟踪等典型应用场景进行性能对比分析,验证了不同滤波方法在精度、稳定性和计算复杂度方面的表现。文中提供完整的代码实例与技术解析,涵盖状态预测、协方差更新、观测修正等关键环节,强化了理论与实践的结合,具有较高的科研参考价值与工程指导意义。; 适合人群:具备信号处理、控制理论或状态估计基础知识的研究生、科研人员,以及从事导航、自动化、机器人、航空航天等相关领域的工程技术人员。; 使用场景及目标:① 深入理解UKF、EKF与PF的算法原理及其在非线性系统中的实现机制;② 在目标跟踪、多传感器融合、惯性导航等实际项目中开展算法选型、仿真验证与性能优化;③ 支持科研论文复现、算法改进及工程原型开发。; 阅读建议:建议结合Matlab代码同步运行与调试,重点理解各滤波器的状态更新逻辑与误差协方差传播机制,尝试在不同噪声水平与系统非线性程度下对比算法鲁棒性,以深化对滤波器内在特性的掌握。

emacs 使用积累5.1 gtags gtags-cscope

#vim   ~/.emacs  (load "/usr/share/emacs/site-lisp/global/gtags.el")  (autoload 'gtags-mode "gtags" "" t)  ;gtags-mode is true  (global-set-key (kbd "M-.") 'gtags-find-tag)  (global-se

探秘 3076

人工智能基于RAG与LangGraph的企业级客服系统优化:大模型推理加速与多Agent协同决策技术实现

内容概要:本文档是一份企业级AI项目面试总结,涵盖多家公司在大模型、RAG、LangGraph、Agent系统、知识图谱、NL2SQL等前沿技术方向的实操性问题与解答。重点包括RAG全流程优化(切分、存储、召回、推理、缓存)、大模型推理加速(vLLM、TensorRT-LLM、量化、PD分离)、Agent架构设计(状态管理、多智能体协作、记忆机制、安全控制)、LangGraph与LangChain的应用差异、AB测试与模型评估方法、以及在客服、问数、数字人等场景中的落地实践。同时涉及Python基础、系统设计、部署运维、国产化适配等综合能力考察。; 适合人群:具备1-3年工作经验,从事大模型应用开发、AI系统研发、NLP工程师等相关岗位的研发人员;熟悉Python、深度学习框架,有RAG、Agent或NL2SQL项目经验者更佳。; 使用场景及目标:①准备AI方向的技术面试,尤其是B2B企业、金融科技、智能客服、工业智能化领域的岗位;②深入理解RAG与Agent系统的工程实现细节,掌握性能优化、系统稳定性、安全性设计等关键技术点;③学习如何将理论模型应用于复杂业务场景,提升系统级设计与问题解决能力。; 阅读建议:此资源以真实面试问答形式呈现,建议结合自身项目经验对照学习,重点关注高频考点如vLLM原理、RAG优化策略、LangGraph状态机制、多Agent协作与回滚设计等内容,并动手实践相关技术点如FastAPI异步服务、Tracker状态持久化、分层chunk策略等,以达到融会贯通的效果。

Eclipse常用的高效插件

今天为使用Eclipse的程序员们,收集一些比较高效的插件,这些插件可以帮助你提高工作效率。 Properties Editor Properties Editor 编辑java的属性文件,并可以自动存盘为Unicode格式,在写一下配置文件的时候,不用工具生成。 官网:http://propedit.sourceforge.jp/index_en.html  Fat Ja

探秘 2688

逆向解析喜马拉雅新版xm-sign算法:从dws.1.6.8.js到签名生成

本文详细解析了喜马拉雅新版xm-sign算法的逆向破解方法。通过定位核心JS文件dws.1.6.8.js,构建本地Node.js模拟执行环境,并解密关键参数cid与appKey,最终实现签名算法的本地化稳定生成,为数据采集提供可靠解决方案。

weixin_29250403的博客 210

BUCK电路三种工作模式全解析:CCM、BCM、DCM到底怎么选?

本文深入解析BUCK电路的CCM、DCM和BCM三种工作模式,通过对比其电流波形、效率、纹波及环路特性,提供基于计算公式的量化判断方法。文章结合电池供电、高精度模拟等具体应用场景,给出明确的模式选型策略与实战设计指南,帮助工程师根据核心需求做出最优决策。

ee345的博客 484

vim使用与插件

vim的tag list 插件 -rw-rw-r--. 1 xcp376 xcp376  31424 2010-01-21 09:40 a.vim  头文件/cpp文件直接切换  :A -rw-rw-r--. 1 xcp376 xcp376  26364 2010-01-21 09:40 bufexplorer.vim   打开的文件列表 \be \bv -r-x------. 1 xcp3

探秘 1863

Theil-Sen Median斜率估计和Mann-Kendall趋势分析:以多年NPP数据为例

一、理论 Theil-Sen Median方法又称为Sen斜率估计,是一种稳健的非参数统计的趋势计算方法。该方法计算效率高,对于测量误差和利群数据不敏感,适用于长时间序列数据的趋势分析。其计算公式为: Mann-Kendall(MK)检验是一种非参数的时间序列趋势性检验方法,其不需要测量值服从正太分布,不受缺失值和异常值的影响,适用于长时间序列数据的趋势显著检验。其过程如下:对 于 序 列Xt = x1,x2,⋯xn,先确定所有对偶值( xi , xj ,...

丑唐的修炼之旅 8万+

emacs 使用积累11 .emacs

;; .emacs         (custom-set-variables  ;; custom-set-variables was added by Custom.  ;; If you edit it by hand, you could mess it up, so be careful.  ;; Your init file should

探秘 1415

Windows显卡TDR超时导致Unity崩溃?手把手教你修改注册表延长响应时间

本文详细解析了Windows显卡TDR超时导致Unity崩溃的问题,并提供了修改注册表延长响应时间的完整解决方案。通过调整TdrDelay和TdrDdiDelay键值,开发者可以有效避免D3D11设备丢失错误,提升Unity编辑器的稳定性。文章还包含显卡驱动优化、系统性能调优等实用技巧,帮助开发者彻底解决编辑器崩溃问题。

weixin_33737774的博客 622

线性代数知识点整理

线性代数基础知识点摘要整理

cuguanren的博客 3万+

vim: 如何使粘贴到vim的代码排列整齐

这个解决了我2个问题 在注释行回车或插入到下一行时   也是注释的 这个问题找了很久没弄好  粘贴到vim的代码,尤其是从WEB粘贴过来的代码,经常是一片混乱,看起来向右不断缩进造成的。 解决的办法是: 1 粘贴完毕使用命令:gg=G 上面这个命令的意义是(摘自http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl): 14.6

探秘 1401

双目视觉入门实战:用Matlab标定相机,再到Python OpenCV完成测距的完整链路

本文详细介绍了双目视觉技术的完整实现流程,从Matlab相机标定到Python OpenCV测距的全链路实践。重点解析了Matlab与OpenCV的参数转换技巧,以及立体校正、视差计算等关键步骤的代码实现,帮助开发者快速掌握双目测距系统的搭建方法。

weixin_29166013的博客 445

vi替换命令

vi替换命令     全局替换 :.,%s/Tracker->Debug(/fprintf(stderr,/g :%s/Tracker->Debug(/fprintf(stderr,/g aaaa--->>>>bbbb :%s/aaaa/bbbb/g     在vim中使用的替换命令如下:  :n,ms/old/new/g:将第n行和第

探秘 1131

CANoe LIN一致性测试之干扰测试Test moudle_LIN Disturbance Block

注意:相邻两个显隐性不同的bit不允许干扰,例如我同时选择bit6和bit7,相邻两个同显隐性的bit允许干扰,例如当我选择bit3和bit4,项,这里我选择ID:为0x2F(PID:0x6F)的frame。需按照具体测试规范实施干扰项,帧头和数据段都可以实现干扰。最近发现一个干扰测试模块,下面是一些具体使用方法。选择干扰项:PID的奇偶校验位(一致性测试干扰测试之手动测试。一个待测试frameD。

yuanyikangkang的博客 3410

Dify与第三方平台(飞书、微信、钉钉)LangBot机器人对接实战

调用链路:飞书用户发消息 → 飞书开放平台事件回调 → LangBot 服务 → Dify 应用接口 → Dify 知识库 + 大模型生成答案 → 原路返回飞书聊天框Dify:承载知识库、提示词配置、大模型调用能力;LangBot:多 IM 渠道适配器,统一对接各大 IM 开放平台与 Dify API;飞书开放平台:提供机器人消息收发、事件推送能力。LangBot 作为中间转发服务,一端对接 Dify 应用 API,一端对接飞书开放平台机器人接口;

悦分享 267

eclipse uml

1,  install new software in eclispe, using the following repo Eclipse Kepler repository - http://download.eclipse.org/releases/kepler    用UML 过滤结果, 选择UML2 http://eclipse.org/modeling/mdt/?pro

探秘 1030

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

emacs 使用积累9 文件search与列表speedbar CEDET tabbar doxymacs:Doxygen Doxywizard

Emacs as software development environment:  http://alexott.net/en/writings/emacs-devenv/index.html       1, speedbar, 类似于sourceInsight里面的目录列表;可以列出     Speedbar是emacs的标准插件,通过命令”M-x s

探秘 1029

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

vim使用积累

vim中执行命令: a, vim打开某个文件,  执行命令,打开某个文件/目录:   :e .       :e  ../../   b, 浏览下一个文件, :bn c, 浏览上一个文件, :bN 在vim中执行命令”:e ~/src/vim70/src/“ d, 打开和关闭行号: :set number 自动缩进: :set autoindent   :set shiftwidt

探秘 1004

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

emacs 使用积累3 workflex.el markdown-mode.el

markdown-mode.el  https://docs.google.com/document/d/1ZhLd_k1M5IGQZJPNzpUaSxEUWRCFYtpnm1Vtb5kihlU/edit     workflex.el ;;; Flex-junk.   ;; Följande tangentbindningar görs:

探秘 904

cscope 生成索引文件 检索数据库文件 主要针对含有3pp的情况下,

#which gencsfile     /home/leosu/bin/gencsfile       #!/bin/bash   WKDIR=/mnt/sda3/dev_iptv/ELYMUS_work LNX=$WKDIR/base/3pp/linux-st710x/linux-2.6.23 #LNX=/extra/a21852/hg/o

探秘 851

Emacs and Global

Would you please install emacs and global on two build servers?1.Emacs: default editor for KreaTV coding. 2.Global is used to tag the codes. See http://wiki.mot-mobility.com/KreaTV/GnuGlobal 

探秘 798

emacs 使用积累1 c++-header-common.el c++-header.el kreatv-cc-style.el kreatv-compile.el

c++-header-common.el ;; Kreatel C++ Headers   (defun kreatel-common-insert-header (filename text)   (insert    (concat "// Copyright (c) "            (format-time-string "%Y")

探秘 798

emacs 使用积累6 Some useful Emacs modes

Some useful Emacs modes PSVN Very useful mode for handling svn directory trees. (load-file "~hallon/elisp/stuff.el") Use M-x svn-status to see the status of the current directory. Press

探秘 704

emacs 使用积累8.2 常用命令

emacs:操作buffer,window,file 什么是 buffer? 什么是 window? 什么是 file? 它们三者之间的关系? Emacs stores each file's text inside an object called a "buffer". Finding a file makes a new buffer inside Emacs. Emacs can

探秘 697
上一篇: emacs 使用积累4
下一篇: emacs 使用积累3 workflex.el markdown-mode.el
bamboolsu
博客等级 码龄22年 200粉丝 394原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值